Subject: Re: [xsl] XSL:FO Identify Transforms From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Sep 2011 12:33:01 -0400 |
I have an XSL I use for identifying the XML - e.g. takes the XML and transforms it into another XML. This works as expected when it's XSLT.
However I need to make this work in the same work but using XSL:FO so that it can be made pretty for print and outputted as a PDF.
I am sure this should be simple, and I am missing something obvious.
How can I get the <xsl:copy> and <xsl:elements> working in FO, or something similar?
<xsl:template match="/ | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template>
<xsl:template match="@*" >
<xsl:element name="attribute">
<xsl:attribute name="name">
<xsl:value-of select="local-name()" />
</xsl:attribute>
<xsl:value-of select="." />
</xsl:element>
</xsl:template>
<xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template>
SAMPLE XML: <?xml version="1.0" encoding="UTF-8"?> <xml> <header> <test>This is test</test> </header> </xml>
-- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL:FO Identify Transforms, Chris Booth | Thread | Re: [xsl] XSL:FO Identify Transform, Liam R E Quin |
[xsl] XSL:FO Identify Transforms, Chris Booth | Date | Re: [xsl] XSL:FO Identify Transform, Liam R E Quin |
Month |