|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: IGNORE CASE IN XSLT match
> I would like to find out ,is there any way to ignore case while > match template in XSLT. In some theoretical sense, the short answer is "no". XML is case sensitive, and thus a <mix> is simply a different element than a <Mix>. However, XPath (and thus XSLT) is perfectly capable of matching more than one element name at once: <xsl:template match=" mix | Mix "> ... </xsl:template> or performing string manipulation inside a predicate in a match, which is what Scott Trenda's solution takes advantage of: XSLT 2.0 ---- --- <xsl:template match="*[ lower-case( local-name() ) = 'mix']"> XSLT 1.0 ---- --- <xsl:template match="*[ translate( local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' ) = 'mix']">
|
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
|






