Hi,

I have an XPATH expression which works in Firefox but not IE8.

"//country/region[text()="London"]/../timeZone"

The error message I get from IE8 is " Message: .. may not appear to the right of / or // or be used with |."

Thanks,


Redrose123

Recommended Answers

All 3 Replies

I'm too using IE8. Please post the relevant input xml, xslt code and expected output, so that I could check.

Here is an extaract of the XML file -

<mapRef country="United Kingdom" ref="11111">
<region>London</region>
<timeZone>GMT</timeZone>
<area>South East</area>
</mapRef>

What I want to find is the value of a node or attribute using a nodes value. For example find the ref number from the timeZone, or as in the example above the timeZone from the region.

Please try with the below snippet:

<xsl:template match="mapRef">
<xsl:value-of select="region[. = 'London']/../timeZone"/>
<xsl:value-of select="timeZone[. = 'GMT']/../@ref"/>
</xsl:template>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.