[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT to populate a SAML AttributeStatement from an

Subject: Re: XSLT to populate a SAML AttributeStatement from an XML
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Jan 2023 20:49:26 -0000
Re:  XSLT to populate a SAML AttributeStatement from an
On 1/18/2023 9:40 PM, ohaya ohaya@xxxxxxxxx wrote:

When I run that with xsltproc I get:


<?xml version="1.0"?>


<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="MY_PN_ID"

NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"><saml:Attribut
eValue
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:type="xsd:string">1111111</saml:AttributeValue></saml:Attribute>

<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="MY_ORG_CD"

NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"><saml:Attribut
eValue
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:type="xsd:string">urn:NORM:DEPT</saml:AttributeValue></saml:Attribute>
<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="MY_ASSOC_CD"

NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"><saml:Attribut
eValue
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:type="xsd:string">urn:NORM:V01</saml:AttributeValue></saml:Attribute>





I don't know why there is that extra blank line after the first
<saml:Attribute>, but when I run xmllint --format I get:

:6: parser error : Extra content at the end of the document
<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:x


What "extra content" is it referring to?



In the end your result XML document, like any XML document, is supposed
to have single root element wrapping all other elements, I thought in
your case e.g. <xsl:template
match="/"><saml:statement><xsl:apply-templates/></saml:statement></xsl:templa
te>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.