[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: AW: Matching two consecutive <br><br>
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|