[xslt] Re: XSLT questions/issues
- From: Aleksey Sanin <aleksey aleksey com>
- To: xslt gnome org
- Cc: "Ferrell Moultrie (ISSAtlanta)" <fmoultrie iss net>
- Subject: [xslt] Re: XSLT questions/issues
- Date: Fri, 12 Jul 2002 16:23:29 -0700
Hi, Daniel and All!
Recently I got few questions about using LibXML + LibXSLT vs Xerces or
MSXML:
http://www.aleksey.com/pipermail/xmlsec/2002/000077.html
http://www.aleksey.com/pipermail/xmlsec/2002/000080.html
Since I am not familiar enough with LibXSLT it'll be great if someone
can answer
these LibXSLT questions (see below).
Thank you in advance,
Aleksey
>2) My XSLT templates have explicit support for copying XML comments through
>to the output. This works with MSXML and Xalan but comments get dropped with
>you XSLT. Is this a configuration or other option or does your DOM just
>ignore comments (as it's allowed to do, but not required to do, by the spec
>-- but which is inconvenient from my perspective).
>
>3) Your XSLT appears to want an explicit root match as the first template.
>I.e.,
>
><xsl:template match='/'>
> <xsl:apply-templates select="@* | node()"/>
></xsl:template>
>
><xsl:template match='/Keys'>
> <xsl:copy>
> <xsl:apply-templates select="@* | node()"/>
> </xsl:copy>
></xsl:template>
>
>... other templates ...
>
><xsl:template match="@* | node()" priority="-10">
> <xsl:copy-of select="."/>
></xsl:template>
>
>And with input XML whose root begins:
><Keys>
> ... other XML
>
>Your XSLT, MSXSL, and Xalan XSLT all process the above script and generate
>essentially the same output. If I delete the first three lines however (the
>match='/'), then MSXSL and Xalan are both still happy but your XSLT matches
>"/" against the final template, i.e., the verbose output shows:
>...
>Registering global variables from transform2.xsl
>xsltProcessOneNode: applying template '@* | node()' for /
>xsltCopyOf: select .
>xsltCopyOf: result is a node set
>
>What is the reasoning behind this behavioral difference? The MSXSL/Xalan
>behavior appears to be correct as I read the books and samples I have but
>I'm far from an expert in XSLT so what's the cause of the incompatibility
>here?
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]