Subject: Re: ALMOST WORKING was Re: [xsl] XSLT to populate a SAML AttributeStatement from an XML From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 19 Jan 2023 15:28:12 -0000 |
I tried the XSLT on the gateway, which does have XSLT 2.0. It looks like it worked, but it's generating some "EXTRANEOUS" output... specifically, it looks like is outputting the VALUE of some the other elements, I am not sure why :(...
There are built-in templates that copy text nodes through, thus where you use apply-templates but have elements selected not matched by your templates the built-in templates copy the text nodes through.
Also in all those case you match explicitly against a certain element that element becomes the context node for the template's code so you usually want e.g.
B <xsl:template match="/record/adrRecord/personnel/ADM_ORG_CD"> <saml:Attribute Name="MY_ORG_CD" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string"> <xsl:value-of select="." /> </saml:AttributeValue> </saml:Attribute> </xsl:template>
<xsl:template match="/record/adrRecord/personnel/ADM_ORG_CD"> <saml:Attribute Name="MY_ORG_CD" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string"> <xsl:value-of select="/record/adrRecord/personnel/ADM_ORG_CD" /> </saml:AttributeValue> </saml:Attribute> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
ALMOST WORKING was Re: [xsl] XSLT t, ohaya ohaya@xxxxxxxx | Thread | Re: ALMOST WORKING was Re: [xsl] XS, ohaya ohaya@xxxxxxxx |
ALMOST WORKING was Re: [xsl] XSLT t, ohaya ohaya@xxxxxxxx | Date | Re: ALMOST WORKING was Re: [xsl] XS, ohaya ohaya@xxxxxxxx |
Month |