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

RE: AW: Matching two consecutive <br><br>

Subject: RE: AW: Matching two consecutive <br><br>
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 23 Aug 2004 13:14:42 +0100
two consecut
>     When would such a condition occur? Wouldnt the association of
> namespace prefix to urn for any namespaces being used have to occur in
> the stylesheet for the XML to be processed correctly? Why would the
> the processor have to think up prefixes on the fly?

In practice if $n is a node in the source document, then name($n) will
almost invariably use the prefix that appeared in the source document: the
only situation in which it might be different is if the source document
assigns two different prefixes to the same namespace, in which case it might
use the wrong one.

However, when you start doing multi-phase transformations, or constructing
source documents programmatically, then prefixes start to become less
predictable, and it's as well not to rely on them.

Just as importantly, the test self::br is likely to be more efficient than
name()='br', because it doesn't involve searching for a prefix, constructing
the lexical QName, and then doing a string comparison.

Michael Kay

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.