xml - How to read the processing-instructions properties? -


i have processing-instructions in xml.

how can id value in processing-instruction when apply

<xsl:template match="dest" >     <?abc ?abc:dest id="e47529cb-4d17-461b-8438-e3b6d9ec1a68"??> </xsl:template> 

the solution is:

input:

<abc> <?abc ?abc:dest id="e47529cb-4d17-461b-8438-e3b6d9ec1a68"??> </abc> 

xslt:

<?xml version='1.0' ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">    <xsl:template match="processing-instruction('abc')">     <p-i><xsl:value-of select="substring-before(substring-after(.,'id=&quot;'),'&quot;')"/></p-i>   </xsl:template> </xsl:stylesheet> 

output:

<p-i>e47529cb-4d17-461b-8438-e3b6d9ec1a68</p-i> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -