[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Evaluatable XPath. ( XPath extensions ).
At 18 May 2000 16:59 +0200, Sydney wrote: > Why not writing this like that > > <cfg> > <text xml:lang="ENG">English text</text> xml:lang attributes should only use language identifiers in the format defined by RFC 1766, which means two-character language codes from ISO 639 among other things. "EN" or "en" (or "En" or "eN") is correct, "ENG" is not. > <text xml:lang="RU">Russian text</text> > </cfg> > > <xsl:template match="cfg/text[@xml:lang = $lang]> > </xsl:template> There's also the lang() function that returns true or false for a match on the current xml:lang value, which could be set by a containing element. lang() matches case-insensitively and ignores country subtags when determining a match. For example, lang('en') returns true when the current xml:lang value is "EN", "en", or even my preferred form: 'en-AU'. Regards, Tony Graham ====================================================================== Tony Graham mailto:tgraham@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9632 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|