Do any of the XSLT OPS processors support copying comments from input
to output? Using the rule below Saxon (tested in my XML editor) on its own will copy comments, but neither oxf:unsafe-xslt nor oxf:xslt do: <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> Maybe I missed something in the docs? Thanks A. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Alex,
try <xsl:template priority="-100" match="*|@*|comment()|processing-instruction()"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> In normal XSLT this will copy any node to the output-tree as long as there is no other template for this certain node - and it also should be working in OPS. Greetz Christian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Christian,
Thanks for the code. However, comments are still not copied. I tested this also in the sandbox here: http://www.orbeon.com/ops/goto-example/xslt A On Feb 28, 2006, at 5:33 AM, [hidden email] wrote: > Hi Alex, > > try > > <xsl:template priority="-100" > match="*|@*|comment()|processing-instruction()"> > <xsl:copy> > <xsl:apply-templates select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > In normal XSLT this will copy any node to the output-tree as long as > there is no other template for this certain node - and it also should > be working in OPS. > > Greetz > Christian > > > -- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Alexander Žaťko
Alexander,
The answer at the moment is "no", because the XPL implementation only passes information provided by a SAX ContentHandler. Comments are not part of that. And yes, that can certainly be considered a bug in the OPS XPL engine. -Erik Alexander Zatko wrote: > Do any of the XSLT OPS processors support copying comments from input to > output? > > Using the rule below Saxon (tested in my XML editor) on its own will > copy comments, but neither oxf:unsafe-xslt nor oxf:xslt do: > > <xsl:template match="node()|@*"> > <xsl:copy> > <xsl:apply-templates > select="node()|@*"/> > </xsl:copy> > </xsl:template> > > Maybe I missed something in the docs? > > Thanks > > A. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |