I have an <xs:any namespace="##any" processContents="skip"> element from a source schema to catch some HTML and pass it along to a similar <Any> element in a destination schema. Now the <Any> element cannot be mapped in the mapper as it is an "open" element and could be anything. So you have to use Inline XSLT (inside a Scripting functoid) to do this.
My source instance looks like this –
<Products>
<LongDescription>
<htmlContent>
<features>
</LongDescription>
:
</Products>
where <htmlContent> is the tag mapped to the <Any> element. My XSLT skills arent great and I wrote this simple xsl to do this
<xsl:value-of select="//LongDescription/htmlContent" />
This XPath evaluates fine in XmlSpy but Visual Studio just doesnt get it. When I debugged the XSLT generated by the mapper, it looks something like this (which does evaluate to the html node)
/s1:Products/child::node()[4]/child::node()[14]/child::node()[2]/child::node()[2]
but when I put this in the Scripting functoid (<xsl:value-of select="/s1:Products/child::node()[4]/child::node()[14]/child::node()[2]/child::node()[2]" />) it doesnt work either. Which leads me to think I may not have configured the Script functoid correctly.
I cant seem to find any examples of how to do the Inline XSLT functoid through and through. Do I need to drag a link from the source to the scripting functoid (or will the xpath expression find the source element?) Did I write the XSL properly (or do I need to define it inside a template?). Can someone help me with the full steps of the Inline XSLT scripting functoid? – many thanks!