Automatic validation against DTD during XSLT transformation

Here should go questions about transforming XML with XSLT and FOP.
twid
Posts: 1
Joined: Tue Sep 07, 2010 3:47 pm

Automatic validation against DTD during XSLT transformation

Post by twid »

Hi,

I'm transforming a document using XSLT (XML to XML), and the output document should validate against a DTD. I've defined the <xsl:output> doctype-system attribute, and if I open the resulting document in the editor view, of course it gets validated.

However, I'd really like this to happen automatically. That is, when I'm clicking 'Run' in the XSLT Debugger view, I'd like the resulting output document to get validated against the DTD automatically.

How can I enable this? Am I overlooking something obvious?

Thanks,

Thomas
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Automatic validation against DTD during XSLT transformation

Post by adrian »

Hello,

I'm afraid this isn't possible in the XSLT debugger in v11.2. We do plan to implement validation of the output soon and I've added your vote to this feature request.

The workaround right now is to configure a transformation scenario(Document -> Transformation -> Configure Transformation Scenario), choose the same XSLT processor as in the debugger and in the Output select the "Open in editor" option.
Then, even in the debugger perspective you can run the transformation separately(Document -> Transformation -> Apply Transformation Scenario) and the output will be opened in an editor and it will get validated automatically. Unfortunately this won't benefit from the back-mapping to the source XML+XSL that the debugger output has.
To make this action more accessible you can enable its toolbar in the debugger perspective: Perspective -> Configure Toolbars -> Transformation.

You should use this scenario even for initializing the debugging session(Document -> Transformation -> Debug Scenario) since it helps in setting up a transformer, its configuration and the XSLT transformation parameters.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply