From a SOAP response, I received the following XML:
<?xml version="1.0" encoding="UTF-8"?> <FindRelativesResponse xmlns="http://avid.com/interplay/ws/assets/types"> <Results> <AssetDescription> <InterplayURI>interplay://avideng103?mobid=060a2b340101010101010f0013-000000-53f2ae93b07200c3-060e2b347f7f-2a80</InterplayURI> <Attributes> <Attribute Name="MOB ID" Group="SYSTEM">060a2b340101010101010f0013-000000-53f2ae93b07200c3-060e2b347f7f-2a80</Attribute> <Attribute Name="Moniker" Group="SYSTEM">1|F9E3A1A4-4CB9-45CC-A590-77A5D733B633|*|1121558|*</Attribute> </Attributes> </AssetDescription> <AssetDescription> <InterplayURI>interplay://avideng103?mobid=060a2b340101010101010f0013-000000-568ad56218ad42e7-060e2b347f7f-2a80</InterplayURI> <Attributes> <Attribute Name="MOB ID" Group="SYSTEM">060a2b340101010101010f0013-000000-568ad56218ad42e7-060e2b347f7f-2a80</Attribute> <Attribute Name="Moniker" Group="SYSTEM">1|F9E3A1A4-4CB9-45CC-A590-77A5D733B633|*|4229098|*</Attribute> <Attribute Name="CATDV RemoteID" Group="USER">11868</Attribute> <Attribute Name="CATDV Animal" Group="USER">Tortoise</Attribute> <Attribute Name="CATDV Director Approved" Group="USER">Director Approved</Attribute> <Attribute Name="CATDV Location" Group="USER">Land</Attribute> <Attribute Name="CATDV Time of Day" Group="USER">Day</Attribute> </Attributes> </AssetDescription> </Results> </FindRelativesResponse> However, my normal attempts at a transform on this are not working. I've tried the following:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="1.0"> <xsl:template match = "/"> <test> <xsl:value-of select="FindRelativesResponse/Results/AssetDescription/Attributes/Attribute[@Name = 'CATDV RemoteID']"/> </test> </xsl:template> </xsl:stylesheet> However, the result would be just empty in the test element.
I'm wondering if it has something to do with this: <FindRelativesResponse xmlns="http://avid.com/interplay/ws/assets/types"> I'm not used to seeing that so I'm wondering if there's a step I'm missing in the xslt.
No comments:
Post a Comment