Re: ALMOST WORKING was Re: [xsl] XSLT to populate a SAML AttributeStatement from an XML

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: Fri, 20 Jan 2023 09:36:44 -0000
Am 1/20/2023 um 12:34 AM schrieb ohaya ohaya@xxxxxxxxx:


FYI, the XSLT I posted was just a snippet of the whole XSLT that I
needed to make. There were bunch of other template matches that I
needed, because there were like 14 or 15, but they were all under
/record/adrRecord, but not directly under /record/adrRecord, i.e.,
there were some under:

/record/adrRecord
/record/adrRecord/personnel
/record/adrRecord/enterpriseUser
etc.

That was why the apply-templates had select "/record/adrRecord/*",
i.e, I wanted all of the template matches "under" "/record/adrRecord".

If I had made the apply-templates on line 9 specific to a single path,
wouldn't the entire XSLT have only processed that one template?


As previously indicated, all depends on how the code is structured,
whether you override the built-in templates.

If you use e.g.

B  <xsl:template match="/"><root><xsl:apply-templates
select="/record/adrRecord"/></root></xsl:template>

then the processor processes the /record/adrRecord element(s). How
exactly depends on matching templates, if you have your own one matching
adrRecords it all depends on whether that template processes its child
nodes with a further xsl:apply-templates.

If you don't have your own template matching that element type, the
built-in templates kick in (unless overridden) and process the children
of adrRecord (and as you noted with an earlier problem, copy text nodes
through).

Current Thread