Validating XSLT stylesheet with Java system-property
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Validating XSLT stylesheet with Java system-property
Hi!
I am developing multiple DITA-OT plug-ins for outputting PDF files.
Today I realized that there are templates that are used commonly in several plug-ins.
Most of the code are the same. However there are some interface changes between plug-ins.
I want to make a new common plug-in that have common templates for all plug-ins.
To do so I *MUST* write the following code in the common template.
I do want to use the same calling interface for all plug-ins. But it is difficult because we must correct so many codes. So I decided to write as previous.
But oXygen reports validation error for one of above two instructions. I noticed that oXygen validation scenario cannot set the Java system-property.
Are there any solutions to validate this code normally?
If I invoke DITA-OT using this code setting Java sysproperty in ant build.xml, it finishes normally.
Regards,
I am developing multiple DITA-OT plug-ins for outputting PDF files.
Today I realized that there are templates that are used commonly in several plug-ins.
Most of the code are the same. However there are some interface changes between plug-ins.
I want to make a new common plug-in that have common templates for all plug-ins.
To do so I *MUST* write the following code in the common template.
Code: Select all
<xsl:variable name="isConditional" as="xs:boolean" select="ahf:isConditionalWoUkUs($row)" use-when="not(system-property('is.print.pdf') eq 'yes')"/>
<xsl:variable name="isConditional" as="xs:boolean" use-when="system-property('is.print.pdf') eq 'yes'">
<xsl:call-template name="ahf:isConditionalWoUkUs">
<xsl:with-param name="prmElem" select="$row"/>
</xsl:call-template>
</xsl:variable>
But oXygen reports validation error for one of above two instructions. I noticed that oXygen validation scenario cannot set the Java system-property.
Are there any solutions to validate this code normally?
If I invoke DITA-OT using this code setting Java sysproperty in ant build.xml, it finishes normally.
Code: Select all
<sysproperty key="is.print.pdf" value="yes"/>
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Re: Validating XSLT stylesheet with Java system-property
There is another situation that I need validation with Java system-property.
Code
Import instruction
dita2fo_pdf_html_review_alternate.xsl
As I cannot set Java system-property oXygen mark the <variable name="makePageFn"> as error because $pSupportPageFn is not defined.
Hope this helps your understanding.
Code
Code: Select all
<xsl:variable name="makePageFn" as="xs:boolean" select="(string(@page-fn) eq $cYes) and $pSupportPageFn"/>
Code: Select all
<xsl:import href="dita2fo_pdf_html_review_alternate.xsl" use-when="system-property('is.print.pdf') eq 'yes'"/>
Code: Select all
<xsl:variable name="pSupportPageFn" as="xs:boolean" select="true()"/>
Hope this helps your understanding.
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Validating XSLT stylesheet with Java system-property
Hi,
I understand your problem.
Indeed in Oxygen when validating a certain XSLT document you can not specify that a certain system property should be set to a certain value for validation of a certain XSLT document.
Oxygen is a Java application and the validation is done in the same Java process which started Oxygen. So we cannot dynamically set system properties just for validation of a specific XSL because the system property would influence the entire application and all XSLT documents validated in it.
But it is possible to modify Oxygen's startup script to specify an extra system property using the construct -Dis.print.pdf=no which would apply in the entire Oxygen workspace for validating all opened XSLT documents.
The Oxygen startup scripts are located in:
http://www.oxygenxml.com/doc/ug-oxygen/ ... chers.html
When the DITA OT publishing is executed, it runs in its own Java process so it can have different system properties.
Regards,
Radu
I understand your problem.
Indeed in Oxygen when validating a certain XSLT document you can not specify that a certain system property should be set to a certain value for validation of a certain XSLT document.
Oxygen is a Java application and the validation is done in the same Java process which started Oxygen. So we cannot dynamically set system properties just for validation of a specific XSL because the system property would influence the entire application and all XSLT documents validated in it.
But it is possible to modify Oxygen's startup script to specify an extra system property using the construct -Dis.print.pdf=no which would apply in the entire Oxygen workspace for validating all opened XSLT documents.
The Oxygen startup scripts are located in:
http://www.oxygenxml.com/doc/ug-oxygen/ ... chers.html
When the DITA OT publishing is executed, it runs in its own Java process so it can have different system properties.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 116
- Joined: Fri Apr 08, 2011 7:58 am
Re: Validating XSLT stylesheet with Java system-property
Hi Radu,
Thank you for your explanation.
I will try changing oXygen startup script.
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
E-Mail tmakita@antenna.co.jp
8077-1 Horikita Minamiminowa Vil. Kamiina Co.
Nagano Pref. 399-4511 Japan
Tel +81-265-76-9300 Fax +81-265-78-1668
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Thank you for your explanation.
I will try changing oXygen startup script.
Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
E-Mail tmakita@antenna.co.jp
8077-1 Horikita Minamiminowa Vil. Kamiina Co.
Nagano Pref. 399-4511 Japan
Tel +81-265-76-9300 Fax +81-265-78-1668
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service