dealing with case sensitivity in client side xslt accross ie6+ and mozilla

parkerburnt

New Member
I am delivering a small amount of XML to the client wrapped in a DIV, using jQuery I snip it out, store it as a string (called text) and convert it into a XMLdoc fragment.In IE(6+) I use:\[code\]var doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(text);\[/code\]in MOZILLA(3+) I use:\[code\]var parser=new DOMParser();var doc=parser.parseFromString(text,'text/xml');\[/code\]this works fine, except that IE capitalises all the tag names, and Mozilla puts them all into lower case. The problem is that the XSLT I am then applying to them is case sensitive, and I am therefore having to write 2 templates, eg:\[code\]<xsl:template match="VIDEOPLAYER">...\[/code\]and\[code\]<xsl:template match="videoplayer">...\[/code\]which are doing the same thing (in this case injecting javascript).(I do not want to do the XSLT on the server because I don't want to have to parse every outgoing page, and that would be a problem for our server.)So does anyone know if there is either a way to control the case transformations that happens in the creation of the XML object, or a way of dealing with case in my XSLT xpath match attributes.
 
Back
Top