This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Re: needing clarification about XSL transformat ion


>From the specification (http://www.w3.org/TR/xslt#copying):

"For example, the identity transformation can be written using xsl:copy as
follows:

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>"

This seems pretty straightforward.  I searched through the specification,
and the only other occurrences of "node()" in the specification are in the
line first quoted by Robert and the default value of the select() attribute
in the non-normative DTD for XSL.  To answer Robert's original question,
XSLTProc seems to have a flaw here, and I would suggest submitting a bug
report on the XMLLib website.

Jeff
-----Original Message-----
From: Vitaly Ostanin [mailto:vyt at vzljot dot ru]
Sent: Monday, March 03, 2003 10:28 AM
To: Robert P. J. Day
Cc: docbook-apps at lists dot oasis-open dot org
Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL
transformation


On Mon, 3 Mar 2003 09:59:18 -0500 (EST)
"Robert P. J. Day" <rpjday at mindspring dot com> wrote:

> On Mon, 3 Mar 2003, Vitaly Ostanin wrote:
> 
> > With this style xslt-processor must not copy comments and PI.
> > This style not overriding built-in templates, so saxon is
> > incorrect.
> 
>   ah, so as i read this, the conflict resolution is that,
> even if i have a template that matches "node()", that will
> be overridden by the more explicit built-in rule that matches
> "comment()" explicitly, whose effect is to do nothing with
> the comment.

Sometime I see in spec "node", sometime -- "element"... :(

>   perhaps it's just kay's wording, but in his book at the
> bottom of p. 315, he writes (after a list of how template
> matching is done):

I don't read this book, but I believe in
http://www.w3.org/TR/xslt
:)

>   "If there are *no* [my emphasis] templates that match
> the selected node, the built-in template for the relevant
> node type is used."
> 
>   the way i read this is that the "node()" test *would*
> match a comment(), and thus my template would be used.
> apparently, that's not what he meant, but you can see
> how it could be interpreted that way, i hope.

node() is not a comment, not PI, not attribute - it just node
like
<node/>

comment() is just a comment like
<!-- comment -->

processing-instruction() is just PI like
<?... ?>

-- 
Regards, Vyt
mailto:  vyt at vzljot dot ru
JID:     vyt at vzljot dot ru


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]