[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: 3 XSLT2 quickies

Subject: Re: 3 XSLT2 quickies
From: Soren Kuula <dongfang@xxxxxxxxxxx>
Date: Fri, 17 Mar 2006 17:18:16 +0100
firefox xslt2
Hi, thanks once more Michael,

Note also that the rule about concatenating text nodes comes into play here:
if your input were

<a>foo<!--hey!-->bar</a>

the result would be "foobar" rather than "foo-ostrich-bar" because of the
rule that adjacent text nodes are concatenated before atomization.


OK, that makes sense ... as in IDREFS value, it also has length 1 anyway, regardless of the comment.

document-node(schema-element(rubberduck))


document-node()[child::schema-element(rubberduck)]


Obviously this only works when used as a step in a path expression, or as pattern: not for example when used in an "as" attribute.

Technically I think the rewrite is more like:

document-node()[count(child::*)=1 and count(child::text()=0) and
(child::schema-element(rubberduck))]


Stand by; can a document node ever, every contain text nodes?

Aren't the specified in XDM or even Infoset, to only have element (exactly one), child or processing-instruction children?

Soren

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.