Configuring XSLT Debugger for custom PDF plugin

kirkilj
Posts: 76
Joined: Fri May 14, 2010 12:14 am

Configuring XSLT Debugger for custom PDF plugin

Post by kirkilj » Fri Mar 15, 2019 12:03 am

It's been a few years since I used the XSLT debugger with DITA PDF transforms. I followed the instructions in https://www.oxygenxml.com/doc/versions/ ... formations.

When I open stage1.xml, I have one validation error on the second line:

Code: Select all

<opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic"
xmlns:ot-placeholder="http://suite-sol.com/namespaces/ot-placeholder">
The error msg is: "Invalid format for "class" attribute. Class attribute not specified."

The schema model for this element does not show that @class is allowed on this element: (#PCDATA | title | topicref)* with only the attributes @xmlns:opentopic and @xmlns:ot-placeholder.

I'm using DITA-OT 3.2.1 with a custom PDF plugin.

Thoughts?

Radu
Posts: 6398
Joined: Fri Jul 09, 2004 5:18 pm

Re: Configuring XSLT Debugger for custom PDF plugin

Post by Radu » Fri Mar 15, 2019 8:35 am

Hi John,

You should not expect the intermediary XML document to be valid according to the DITA standard. So jut ignore that error or all other errors signaled on that file.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kirkilj
Posts: 76
Joined: Fri May 14, 2010 12:14 am

Re: Configuring XSLT Debugger for custom PDF plugin

Post by kirkilj » Fri Mar 22, 2019 5:47 pm

Thanks Radu,

I can debug now, but some templates and variables still don't resolve.

* Is Master File support required for all template and variable references to resolve?

* If so, which xsl files or DITA Map files should I include?

* And should these be the xsl files in my local Git repos for dita-ot and our custom plugins OR should they be the versions of these that are located in our <dita test content>/target/dita/plugins directory, which is built by maven at the beginning of our test builds?

kirkilj
Posts: 76
Joined: Fri May 14, 2010 12:14 am

Re: Configuring XSLT Debugger for custom PDF plugin

Post by kirkilj » Sat Mar 23, 2019 2:51 am

I'd also like to know if the topic2fo_shell_fop.xsl I should select as the XSLT target of the Transformation Scenario should be the one in:

(1) our custom PDF plugin at plugins/com.acme.pdf or
(2) the plugins/org.dita.pdf2 or
(3) plugins/org.dita.pdf2.fop?

Do all of these have to be in the Master File list?

Radu
Posts: 6398
Joined: Fri Jul 09, 2004 5:18 pm

Re: Configuring XSLT Debugger for custom PDF plugin

Post by Radu » Mon Mar 25, 2019 4:04 pm

Hi John,

Please see some answers below:
I can debug now, but some templates and variables still don't resolve.
If you can debug, then all XSLTs have been compiled and all variables have been resolved by the debugger.
You probably still have problems with Oxygen highlighting with validation errors various parts of your XML documents.
Is Master File support required for all template and variable references to resolve?
Yes. So in the Master Files folder you can add a reference to the same main top-level XSLT stylesheet you used to start the debug process. This should signal Oxygen's validation to also use it. The "Master Files" folder will not influence the debug process in any way, it only influences the validation.
* If so, which xsl files or DITA Map files should I include?
The XSLT debugger is applied on a merged DITA Map. From our previous discussion you should not expect that merged DITA Map to be perfectly valid. Also the XSLT debugger is applied on a top level XSLT document. That XSLT document should also be added to Oxygen's "Master Files" folder.
* And should these be the xsl files in my local Git repos for dita-ot and our custom plugins OR should they be the versions of these that are located in our <dita test content>/target/dita/plugins directory, which is built by maven at the beginning of our test builds?
You should have some kind of working DITA Open Toolkit with all plugins installed, then use the XSLT stylesheets from it.
I'd also like to know if the topic2fo_shell_fop.xsl I should select as the XSLT target of the Transformation Scenario should be the one in:
If your "com.acme.pdf" contributes an ANT build file which contributes a new transtype and that new transtype calls a top level XSLT stylesheet for processing the merged XML document, that XSLT stylesheet should be used for debugging and for validation (added to the master files folder).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply