Element trace

Here should go questions about transforming XML with XSLT and FOP.
Noxwizard
Posts: 2
Joined: Sat Jan 21, 2012 1:41 am

Element trace

Post by Noxwizard »

Is it possible to have the editor trace an element's style for you? If I want to know what fo blocks are going to be output when I add a title block, it'd be nice if I could somehow jump to it from my XML file. Much like in Chrome where you can inspect an element and see what classes and styling is applied to it. I'm using the docbook XSL, so there are quite a few files to hunt through if I want to change something or at least see what it's doing.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Element trace

Post by sorin_ristache »

Hello,

Oxygen has a feature for mapping an output area of an XSLT transformation to the XML element and XSLT element that generated that area. It is available in the XSLT Debugger perspective. You should do the following:
  • configure a transformation that generates the desired XSL-FO output (for example by editing the built-in Docbook PDF transformation and disabling the FO processing step on the FO Processor tab of the dialog box),
  • start that transformation in the XSLT Debugger with the Debug Scenario action available on the Transformation toolbar of the Editor perspective,
  • run the transformation completely in the XSLT debugger
  • click on an area of the XSL-FO output (in the Text output view) to see the XML element and the XSLT template (from the Docbook XSL stylesheets) that generated it

Regards,
Sorin
Noxwizard
Posts: 2
Joined: Sat Jan 21, 2012 1:41 am

Re: Element trace

Post by Noxwizard »

Going through the text output view isn't pleasant, but it takes me where I wanted to go. Thanks!
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Element trace

Post by sorin_ristache »

Hi,

That is necessary because there is no special view for rendering XSL-FO by applying the XSL-FO layout directives. There is an XHTML rendering view in the Debugger which allows you to trace an area of XHTML output to the XML and XSLT source but that cannot help you with any XSL-FO output.


Regards,
Sorin
Post Reply