0

I do have an XML file that starts as following:

<wfs:WFS_Capabilities xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" ...>

I do have the full xml file in an xsl:variable named="CAPAPILITIES" and the namespace identifier "ogc" in an xsl:variable named "prefix". I tried the following but it does not work:

<xsl:value-of select="$CAPABILITIES/namespace::*[name()='$prefix']" /> 

1 Answer 1

1

and the namespace identifier "ogc" in an xsl:variable named "prefix"

You need to remove the quotes around $prefix:

<xsl:value-of select="$CAPABILITIES/namespace::*[name()=$prefix]" />

in order to compare the namespace node's name() against the value of the prefix variable instead of against the literal string "dollar-prefix".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.