[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: No Subject
"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@vzljot.ru] Sent: Monday, March 03, 2003 10:28 AM To: Robert P. J. Day Cc: docbook-apps@lists.oasis-open.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@mindspring.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@vzljot.ru JID: vyt@vzljot.ru --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 10:52:07 -0500 From: Brian Burridge <maillist@burridge.net> Subject: DOCBOOK-APPS: REPOST: Double-sided gives error To: docbook-apps@lists.oasis-open.org Message-id: <1046706727.22905.3.camel@mi6.local> Organization: MIME-version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Content-type: text/plain Content-transfer-encoding: 7BIT X-Loop-Detect: 1 List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> (that's the second time I've posted to this maillist and never seen the post appear). When I add the line below, I get "[ERROR] org.apache.fop.apps.StreamRenderer$RenderQueueEntry" very near the beginning and processing stops. That is the only change I'm making. <xsl:param name="double.sided" select="1"/> Brian --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 17:19:51 +0100 From: Jirka Kosek <jirka@kosek.cz> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation To: Vitaly Ostanin <vyt@vzljot.ru> Cc: "Robert P. J. Day" <rpjday@mindspring.com>, docbook-apps@lists.oasis-open.org Message-id: <3E6380A7.ED874612@kosek.cz> MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) Content-type: text/plain; charset=iso-8859-2 Content-transfer-encoding: 7BIT X-Accept-Language: en References: <20030303173219.716c324e.vyt@vzljot.ru> <Pine.LNX.4.44.0303030954180.11353-100000@dell> <20030303182804.0c9c3a0e.vyt@vzljot.ru> List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> Vitaly Ostanin wrote: > node() is not a comment, not PI, not attribute - it just node > like > <node/> With respect, you are wrong. Exact behaviour of node() is defined in XPath recommendation and you can read in section 2.3: "A node test node() is true for any node of any type whatsoever." any type = element node, PI node, comment node, ... Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 11:28:21 -0500 (EST) From: "Robert P. J. Day" <rpjday@mindspring.com> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation In-reply-to: <3E6380A7.ED874612@kosek.cz> X-X-Sender: rpjday@dell To: Jirka Kosek <jirka@kosek.cz> Cc: Vitaly Ostanin <vyt@vzljot.ru>, docbook-apps@lists.oasis-open.org Message-id: <Pine.LNX.4.44.0303031125530.12396-100000@dell> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> On Mon, 3 Mar 2003, Jirka Kosek wrote: > Vitaly Ostanin wrote: > > > node() is not a comment, not PI, not attribute - it just node > > like > > <node/> > > With respect, you are wrong. Exact behaviour of node() is defined in > XPath recommendation and you can read in section 2.3: > > "A node test node() is true for any node of any type whatsoever." > > any type = element node, PI node, comment node, ... which agrees with tidwell, but disagrees with kay, and definitely disagrees with http://www.w3.org/TR/xslt, which states, (Section 5.2) "node() matches any node other than an attribute node or the root node" my brain hurts. rday --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 17:37:35 +0100 From: Jirka Kosek <jirka@kosek.cz> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation To: "Robert P. J. Day" <rpjday@mindspring.com> Cc: Vitaly Ostanin <vyt@vzljot.ru>, docbook-apps@lists.oasis-open.org Message-id: <3E6384CF.F124D5BD@kosek.cz> MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) Content-type: text/plain; charset=iso-8859-2 Content-transfer-encoding: 7BIT X-Accept-Language: en References: <Pine.LNX.4.44.0303031125530.12396-100000@dell> List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> "Robert P. J. Day" wrote: > which agrees with tidwell, but disagrees with kay, and definitely > disagrees with http://www.w3.org/TR/xslt, which states, (Section 5.2) > > "node() matches any node other than an attribute node or the > root node" It is correct statement. Note that XPath expression node() (not node test alone, whole XPath expression) is shorthand of child::node(). You can't select attribute this way as you aren't using attribute:: axis. You can't also select root node, because it hasn't parent. Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 11:40:01 -0500 (EST) From: "Robert P. J. Day" <rpjday@mindspring.com> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation In-reply-to: <3E6384CF.F124D5BD@kosek.cz> X-X-Sender: rpjday@dell To: Jirka Kosek <jirka@kosek.cz> Cc: Vitaly Ostanin <vyt@vzljot.ru>, docbook-apps@lists.oasis-open.org Message-id: <Pine.LNX.4.44.0303031135590.12548-100000@dell> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> On Mon, 3 Mar 2003, Jirka Kosek wrote: > "Robert P. J. Day" wrote: > > > which agrees with tidwell, but disagrees with kay, and definitely > > disagrees with http://www.w3.org/TR/xslt, which states, (Section 5.2) > > > > "node() matches any node other than an attribute node or the > > root node" > > It is correct statement. Note that XPath expression node() (not node > test alone, whole XPath expression) is shorthand of child::node(). You > can't select attribute this way as you aren't using attribute:: axis. > You can't also select root node, because it hasn't parent. ok, now we're making progress. so 1) technically, comments and processing-instructions will be matched by node(), right? (that is, those two nodes are in fact child nodes) 2) based on the answer to 1), if i have a template matching "node()" and the built-in rule for "comment()", which one will be used to process comments? my general "node()" rule? or the more specific built-in "comment()" rule? IOW, if i want to do something with either comments or processing instructions, must i add a template that matches *exactly* a comment or procssing-instruction()? basically, if a comment node matches node(), i'd like to think that it would be processed by *my* template using "node()", even if there is a more specific built-in for "comment()". rday --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 17:59:15 +0100 From: Jirka Kosek <jirka@kosek.cz> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation To: "Robert P. J. Day" <rpjday@mindspring.com> Cc: Vitaly Ostanin <vyt@vzljot.ru>, docbook-apps@lists.oasis-open.org Message-id: <3E6389E3.112F34D8@kosek.cz> MIME-version: 1.0 X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) Content-type: text/plain; charset=iso-8859-2 Content-transfer-encoding: 7BIT X-Accept-Language: en References: <Pine.LNX.4.44.0303031135590.12548-100000@dell> List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> "Robert P. J. Day" wrote: > 1) technically, comments and processing-instructions will be matched > by node(), right? (that is, those two nodes are in fact child nodes) Yep. > 2) based on the answer to 1), if i have a template matching "node()" > and the built-in rule for "comment()", which one will be used > to process comments? my general "node()" rule? or the more > specific built-in "comment()" rule? IOW, if i want to do something > with either comments or processing instructions, must i add a > template that matches *exactly* a comment or procssing-instruction()? It's easy. If you override template for comment() or processing-instruction() they will be used in favor of built-in rules because built-in templates have lower precedence (they behave as if they were imported): "The built-in template rules are treated as if they were imported implicitly before the stylesheet and so have lower import precedence than all other template rules. Thus, the author can override a built-in template rule by including an explicit template rule." If in some XSLT processor node() test doesn't override built in template, then it is bug. > basically, if a comment node matches node(), i'd like to think that > it would be processed by *my* template using "node()", even if there > is a more specific built-in for "comment()". It should work that way, as default computed priority should be same for node() and comment(), so comment() is not more specific and should be overwritten baceuse of import precedence. But to be honest, I think that problem layes in a section 5.5.1 of XSLT spec. I think that Saxon's and xsltproc's understanding of "all matching template rules" is different. But this discussion should be probably moved to some xsl specific or processor specific list. It drifted far away from DocBook processing. Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg) Date: Mon, 03 Mar 2003 11:58:44 -0500 (EST) From: "Robert P. J. Day" <rpjday@mindspring.com> Subject: Re: DOCBOOK-APPS: Re: needing clarification about XSL transformation In-reply-to: <3E6389E3.112F34D8@kosek.cz> X-X-Sender: rpjday@dell To: Jirka Kosek <jirka@kosek.cz> Cc: Vitaly Ostanin <vyt@vzljot.ru>, docbook-apps@lists.oasis-open.org Message-id: <Pine.LNX.4.44.0303031158170.12679-100000@dell> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT List-Owner: <mailto:docbook-apps-help@lists.oasis-open.org> List-Post: <mailto:docbook-apps@lists.oasis-open.org> List-Subscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=subscribe> List-Unsubscribe: <http://lists.oasis-open.org/ob/adm.pl>, <mailto:docbook-apps-request@lists.oasis-open.org?body=unsubscribe> List-Archive: <http://lists.oasis-open.org/archives/docbook-apps/> List-Help: <http://lists.oasis-open.org/elists/admin.shtml>, <mailto:docbook-apps-request@lists.oasis-open.org?body=help> List-Id: <docbook-apps.lists.oasis-open.org> On Mon, 3 Mar 2003, Jirka Kosek wrote: > But this discussion should be probably moved to some xsl specific or > processor specific list. It drifted far away from DocBook processing. i agree. i've already posted on the mulberrytech list, so i'll see what i get back there. rday --Boundary_(ID_C3G0637rVaP+1NFb/Bx8Xg)-- --Boundary_(ID_3VqOShESWWKt1/FHxfU5Ag)--
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Powered by ezmlm-idx