chained stylesheets
Are you missing a feature? Request its implementation here.
chained stylesheets
Post by xan »
Could use the ability to chain stylesheet transformations, or something more general like XML Pipeline:
http://www.w3.org/TR/2002/NOTE-xml-pipeline-20020228/
My situation is that the output of one transformation is the input to another one.
http://www.w3.org/TR/2002/NOTE-xml-pipeline-20020228/
My situation is that the output of one transformation is the input to another one.
Thanks for the quick reply, George. I tried that but couldn't get it to work and assumed it was for CSS stylesheets instead of XSLT stylesheets. The error I get is "E Failure reading null null ". (I always like apps that let me Copy error messages!)
I was looking for something like "Chain Scenario" so the next transformation could have its own parameters and output info, too. Fortunately, only my first transformation requires parameters, so I'm hopeful I can get this to work. Any ideas?
xan
I was looking for something like "Chain Scenario" so the next transformation could have its own parameters and output info, too. Fortunately, only my first transformation requires parameters, so I'm hopeful I can get this to work. Any ideas?
xan
Hi Xan,
I tested the cascade stylesheet transformation and I didn't see any problems.
See bellow the files that i used in transformation :
The XML file :
The first XSL file :
The second XSL file :
I also added the parameter "p" with value "paramValue" in the parameters list.
The result of the transformation must be :
If you still have problems please send us some samples to support@oxygenxml.com.
Best Regards,
Octavian
I tested the cascade stylesheet transformation and I didn't see any problems.
See bellow the files that i used in transformation :
The XML file :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root>
<elem>Cascade</elem>
</root>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<Step1>
<xsl:apply-templates mode="copy" select="."/>
</Step1>
</xsl:template>
<xsl:template match="*" mode="copy">
<xsl:copy>
<xsl:apply-templates mode="copy"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="p" select="''"/>
<xsl:output method="xml"/>
<xsl:template match="/">
<Step2>
<xsl:apply-templates mode="copy" select="."/>
<param>The val of param p: <xsl:value-of select="$p"/>
</param>
</Step2>
</xsl:template>
<xsl:template match="*" mode="copy">
<xsl:copy>
<xsl:apply-templates mode="copy"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
The result of the transformation must be :
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<Step2>
<Step1>
<root>
<elem>Cascade</elem>
</root>
</Step1>
<param>The val of param p: paramValue</param>
</Step2>
Best Regards,
Octavian
Thanks Octavian, Your example worked fine*. I tried experimenting with my setup, and after switching to Xalan the error message was much more informative:
F java.io.FileNotFoundException: /Users/xan/Code/oxygen Folder/local.dtd (No such file or directory) 1:0
My intermediate file has a dtd ref with a relative path, and it's resolving to the oxygen home directory instead of my work directory. I guess that intermediate file doesn't really have a URI, but things would work if you gave it the systemID of the original source file. I tried copying all the needed files into the home directory and the cascaded transform worked fine.
Thanks for your help.
xan
*Well, there was one problem with using your sample you should be aware of. After copying it into oxygen, I was getting strange XSLT errors; eventually I figured that the copy/paste had grabbed some hidden characters (0xCA), which may be nbsp characters.
F java.io.FileNotFoundException: /Users/xan/Code/oxygen Folder/local.dtd (No such file or directory) 1:0
My intermediate file has a dtd ref with a relative path, and it's resolving to the oxygen home directory instead of my work directory. I guess that intermediate file doesn't really have a URI, but things would work if you gave it the systemID of the original source file. I tried copying all the needed files into the home directory and the cascaded transform worked fine.
Thanks for your help.
xan
*Well, there was one problem with using your sample you should be aware of. After copying it into oxygen, I was getting strange XSLT errors; eventually I figured that the copy/paste had grabbed some hidden characters (0xCA), which may be nbsp characters.
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