Re: [xslt] Re: XSLT questions/issues

In message <>
          Aleksey Sanin <> wrote:

> Hi, Daniel and All!
> Recently I got few questions about using LibXML + LibXSLT vs Xerces or
> 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).

My reading is that xsltproc would be doing the right thing by default.
q.v. XSLT specification, '5.8 Built-in Template Rules' which states :

  "The built in template rule for processing instructions and comments is
   to do nothing."

If there's something I've missed there, I'm not sure what.

Since the default action according to the specification is to ignore
comment elements, you would use something like the following to retain
them :

<xsl:template match="comment()">
 <xsl:copy-of select="." />

I don't understand the other question in by brief reading.

Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]