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

Re: ALMOST WORKING was Re: XSLT to populate a SAML At

Subject: Re: ALMOST WORKING was Re: XSLT to populate a SAML AttributeStatement from an XML
From: "ohaya ohaya@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Jan 2023 15:59:17 -0000
Re: ALMOST WORKING was Re:  XSLT to populate a SAML  At
 Hi Martin,

Ok, thanks!! (for both comments)

Jim


     On Thursday, January 19, 2023, 10:28:31 AM EST, Martin Honnen
martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:


Am 1/19/2023 um 2:05 PM schrieb ohaya ohaya@xxxxxxxxx:
> 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.


Usually <xsl:template match="text()"/> helps against that.


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>


and not

<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

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.