Solved

XSLTProcessor - format retention?

  • 28 September 2017
  • 2 replies
  • 5 views

Badge

Hi Safe

I've been experimenting with the XSLTProcessor and transforming a XSL derived document to Word format. All the information comes across to the Word doc however the formatting of text (eg, font size, font color, font type), page margins, (table) column widths and some other document elements are not retained.

Does the XSLTProcessor honor the formatting elements associated with XSL or in-line HTML formatting? - there's very little information associated with the XSLTProcessor 'Help'

Thanks

Conch

icon

Best answer by deanatsafe 29 September 2017, 23:14

View original

2 replies

Badge +6

Hi Conch,

FME uses the Apache Xalan library to do our XSLT transformations. So your best place for documentation as to what is supported is to refer to their docs. Hopefully you can find some info there that describes how in-line HTML formatting is handled - see: https://xml.apache.org/xalan-c/

I also tried a google search with keywords 'xslt', 'xalan', 'html' & 'style' to find potentially helpful articles like: Using XSLT as a stylesheet for HTML (no endorsement implied).

Note that in our FME 2018.0 beta we have a new MS Word writer available with the transformers: MSWordWriter and MSWordStyler. You may want to try this out to see if it gives you better results.

If you still want us to investigate if we can improve our in-line HTML formatting support via XSLTProcessor, then please send us a complete reproduction case including your source data, XSLT script, workspace and transform log to https://www.safe.com/support/report-a-problem/ and choose 'enhancement' as the case type.

Thanks,

Dean

Badge

Hi Conch,

FME uses the Apache Xalan library to do our XSLT transformations. So your best place for documentation as to what is supported is to refer to their docs. Hopefully you can find some info there that describes how in-line HTML formatting is handled - see: https://xml.apache.org/xalan-c/

I also tried a google search with keywords 'xslt', 'xalan', 'html' & 'style' to find potentially helpful articles like: Using XSLT as a stylesheet for HTML (no endorsement implied).

Note that in our FME 2018.0 beta we have a new MS Word writer available with the transformers: MSWordWriter and MSWordStyler. You may want to try this out to see if it gives you better results.

If you still want us to investigate if we can improve our in-line HTML formatting support via XSLTProcessor, then please send us a complete reproduction case including your source data, XSLT script, workspace and transform log to https://www.safe.com/support/report-a-problem/ and choose 'enhancement' as the case type.

Thanks,

Dean

Thanks for the tips Dean, I will look at the apache documents

 

 

Reply