xslt - Convert escaped xml into nodes of the current document -


i working set of interrelated documents collecting single xsl , processing (determining url used based on content , processing done far).

for example document being fetched xsl using:

<xsl:for-each select= "(document('<someurl>')//atom:entry/atom:content/m:properties/d:presentationcontent)  [position()=1]">   <xsl:call-template name="formhandler"/> </xsl:for-each> 

this fine documents.

except in 1 case content of element d:presentationcontent contains escaped xml directly text (ie. not using cdata) e.g.

&lt;component&gt;&lt;id&gt;tcm:10-7788&lt;/id&gt;&lt;/component&gt; 

is there way within xsl fetch document, convert encoded strings xml , process nodes if part of document example can treated if were:

//atom:entry/atom:content/m:properties/d:presentationcontent/atom:component/atom:id  

i long way through solution , costly me change @ stage - gratefully received. (backup plan construct http proxy make request through , have proxy clean response.)

with xslt 3.0 can use parse-xml() function:

<xsl:template name="formhandler">     <xsl:apply-templates select="parse-xml(text())/component/id" /> </xsl:template> 

because escaped xml not have delclared namespaces or namespace-prefix, elements should addressed without namespace.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -