Subject: [xsl] Templates not applied to output of document HTTP call From: Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx> Date: Thu, 13 Sep 2012 14:44:58 +0100 |
This is pretty much the same code I posted this earlier. The code below ignores it's input and is supposed to apply templates to the output of the HTTP call in the doc function, however it hangs. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oc="http://extend.com/opencase/2.0" version="2.0"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <xsl:apply-templates select="doc('http://blah')"/> </xsl:template> <xsl:template match="feed"> <xsl:text>http://blah?entityType=VOD&filters=beid:equals:[</xsl:text> <xsl:apply-templates select="product"/>] </xsl:template> <xsl:template match="product"> <xsl:apply-templates select="descendant::oc:bundle/externalID"/> <xsl:if test="not(position()=last())">,</xsl:if> </xsl:template> </xsl:stylesheet> I have verified that the HTTP call works by substituting xsl:copy-of for the apply-templates and I do get back the XML I expect. Here is a cutdown version of the XML returned from the HTTP call. <feed xmlns:media="http://search.yahoo.com/mrss/" xmlns:oc="http://extend.com/opencase/2.0" xmlns:ocmedia="http://extend.com/opencase/2.0/ocmedia"> <product> <oc:bundle> <name>VoD_70</name> <altCode/> <uuid>4c219204-4bd9-42d9-8b39-9bd7f2b43a93</uuid> <externalID>Asset_0097_VoD_70</externalID> <createDate>2012-08-17T14:48:47.863Z</createDate> <lastModified>2012-08-17T14:51:16.237Z</lastModified> <isActive>true</isActive> </oc:bundle> </product> <product> <oc:bundle> <name>VoD_150</name> <altCode/> <uuid>7a93f556-cf0c-4761-8642-f5013b83b03f</uuid> <externalID>Asset_0177_VoD_150</externalID> <createDate>2012-08-17T14:48:59.820Z</createDate> <lastModified>2012-08-17T14:51:17.127Z</lastModified> <isActive>true</isActive> </oc:bundle> </product> </feed>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Upgrading version should , Michael Kay | Thread | Re: [xsl] Templates not applied to , Andrew Welch |
Re: [xsl] Replacing substring with , Florent Georges | Date | Re: [xsl] Templates not applied to , Andrew Welch |
Month |