Re: [xsl] Copying all comments [xsltproc 1.0]

Subject: Re: [xsl] Copying all comments [xsltproc 1.0]
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 05 Oct 2010 09:32:13 +0100
On 05/10/2010 07:45, pankaj.c@xxxxxxxxxxxxxxxxxx wrote:
Hello again,

And what about displaying the value of @id of<query id="Q1"> before it.

<xsl:value-of select="substring(.,
13,substring-before(.,'&#x0022;'))"/><xsl:text>.&#x0009;</xsl:text>
is incorrect
<xsl:value-of select="substring(.,
13,substring-before(.,'"'))"/><xsl:text>.&#x0009;</xsl:text>
An xslt stylesheet has to be well formed, you are using " around the attribute value so you have to quote any " appearing in the attribute.

and <xsl:value-of select="substring(., 13,1))"/><xsl:text>.&#x0009;</xsl:text> will not help as the no (Q1) can exceed to two digit (10-99) to three digit.Not

I think it's useless to use right double quote unicode value here.
not sure what you mean by that comment

Assuming that "Q1" are the first and second " in the value then you want

<xsl:value-of select=
"substring-before(substring-after(.,'&quot;'),'&quot;')"
/>

which will produce Q1

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________


Current Thread