script to extract entityIDs
Ian Young
ian at iay.org.uk
Sun Aug 9 16:26:39 EDT 2015
> On 9 Aug 2015, at 19:44, Cantor, Scott <cantor.2 at osu.edu> wrote:
>
> XSLT is the obvious way, but I haven't done one in a while and they take me an hour or two to do when I haven't been doing them recently.
>
> Without getting too in depth into edge cases like checking validUntil, you'd match on an XPath expression of EntityDescriptor/IDPSSODescriptor and have that template match spit out @entityID from the root element.
>
> xsltproc is generally available on both Linux and Mac.
As an example of the general XML-to-text kind of thing:
https://github.com/ukf/ukf-meta/blob/master/build/extract_locs.xsl
For this specific case, off the top of my head, you'd dump all of the templates except the last one and then do something like:
<xsl:template match="//md:EntityDescriptor[md:IDPSSODescriptor]">
<xsl:value-of select="@entityID"/>
<xsl:text>
</xsl:text>
</xml:template>
Let me know if you need the worked example.
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5250 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/dev/attachments/20150809/bf4cf922/attachment.p7s>
More information about the dev
mailing list