[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: alternative to repeatedly walking the ancestor axi
Hi,
At 06:00 AM 8/4/2008, you wrote: 2008/8/2 Michael Kay <mike@xxxxxxxxxxxx>: Or slightly more exactly, ancestor-or-self::*[@xml:lang]/@xml:lang = 'foo' except that the lang() function should return true if the lang tested is a subset of that declared in the attribute. ... and also the test is case-insensitive, in accordance with IETF RFC 3066 (http://www.ietf.org/rfc/rfc3066.txt), referenced by xml:lang (http://www.w3.org/TR/REC-xml/ section 2.12). So the xml:lang values of 'EN-GB', 'en-us' and 'en' all test true to lang()='en'. So given an existing proprietary solution that walks the ancestor axis a lot, you're not going to gain anything by switching to xml:lang... I submit that speculating on performance differences vs alternatives is somewhat pointless, since it will depend on the implementation. It's not that it couldn't be optimized (especially if it were supported in the parser), so much as that it might not be. Cheers, Wendell
|
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
|