FAQ: http://www.dpawson.co.uk/xsl/sect2/N5536.html#d4805e970
the changed XSLT:
> <xsl:template match="/">
> ....
> <xsl:apply-templates select="samlp:response/samlp:Status"/>
> </xsl:template>
>
>
> <xsl:template match="samlp:response/samlp:Status">
> <xsl:value-of select="StatusCode/@Value"/>
--------------------------------^^^^^^^^^^^^^^^^^
not in XML, so I can't correct it.
> </xsl:template>
Furthermore XML is case-sensitive, so pay attention on samlp:response
and samlp:Response
Regards,
Joerg
Ryan Daly wrote:
Hello,
I wish to return the Value of Statuscode in the
following SAML response example. The stylesheet I am
attempting to use is below the xml code. I beleive
my difficulty stems from the inability to correctly
handle a namespace in the apply-templates tag.
xml code
-----------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<samlp:Response MajorVersion="x" MinorVersion="y"
xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol">
<Status>
<!--This is the value I wish to return--> <StatusCode
Value="Success" />
</Status>
<saml:Assertion AssertionID="xxxx"
IssueInstant="xxxxxx" Issuer="xxxx" MajorVersion="1"
MinorVersion="0"
xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
<saml:AttributeStatement>
<Subject>
<NameIdentifier Format="xxxx"
NameQualifier="xxx">CN=xxxxx,CN=xxxxx,OU=xxxx,OU=xxx,O=xx
xxx,C=xxx</NameIdentifier>
</Subject>
<Attribute AttributeName="xxxxx">
<AttributeValue>xxxx</AttributeValue>
</Attribute>
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>
----------------------------
excerpt from xsl
<xsl:template match="/">
....
<xsl:apply-templates select="samlp:response/Status"/>
</xsl:template>
<xsl:template match="samlp:response/Status">
<xsl:value-of select="StatusCode/@Value"/>
</xsl:template>
-----------------
thanks in advance for your input
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list