[Home] [By Thread] [By Date] [Recent Entries]
Am 1/21/2023 um 10:02 AM schrieb ohaya ohaya@xxxxxxxxx:
Hi, I am wondering if the input sample
transformed by e.g. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" B version="2.0" B xmlns:xs="http://www.w3.org/2001/XMLSchema" B xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" B xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" B exclude-result-prefixes="xs"> B <xsl:output indent="yes"/> B <xsl:template match="*"> B B B <xsl:apply-templates/> B </xsl:template> B <xsl:template match="text()"/> B <xsl:template match="/"> B B B <saml:AttributeStatement> B B B B B <xsl:apply-templates/> B B B </saml:AttributeStatement> B </xsl:template> B <xsl:template match="*[not(*)]">
B B B <saml:Attribute Name="{name()}"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
B B B B B <xsl:for-each select="tokenize(.,':')">
B B B B B B B <saml:AttributeValue
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">
B B B B B B B B B <xsl:value-of select="."/>
B B B B B B B </saml:AttributeValue>
B B B B B </xsl:for-each>
B B B </saml:Attribute>
B </xsl:template></xsl:stylesheet> into e.g. <saml:AttributeStatement xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> B B <saml:Attribute Name="PN_ID" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> B B B B B <saml:AttributeValue xsi:type="xsd:string">1111111</saml:AttributeValue> B B </saml:Attribute> B B <saml:Attribute Name="ADM_ORG_CD" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> B B B B B <saml:AttributeValue xsi:type="xsd:string">urn</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">NORM</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">DEPT</saml:AttributeValue> B B </saml:Attribute> B B <saml:Attribute Name="DOD_ASSOC_CD" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> B B B B B <saml:AttributeValue xsi:type="xsd:string">urn</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">NORM</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">V01</saml:AttributeValue> B B </saml:Attribute> B B <saml:Attribute Name="entUserRoles" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> B B B B B <saml:AttributeValue xsi:type="xsd:string">a</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">b</saml:AttributeValue> B B B B B <saml:AttributeValue xsi:type="xsd:string">c</saml:AttributeValue> B B </saml:Attribute> </saml:AttributeStatement> is perhaps all you want to output?
|

Cart



