script to extract entityIDs
Tom Scavo
trscavo at gmail.com
Tue Aug 11 18:12:15 EDT 2015
On Sun, Aug 9, 2015 at 4:39 PM, Tom Scavo <trscavo at gmail.com> wrote:
> That worked (and is lightning fast). I'll include it in the distribution.
>
> Thanks Ian and Scott.
https://gist.github.com/trscavo/073d0ff1bf23190fad24
> On Sun, Aug 9, 2015 at 4:26 PM, Ian Young <ian at iay.org.uk> wrote:
>>
>>> 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
>>
>>
>>
>>
>>
>> --
>> To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net
More information about the dev
mailing list