RE: [xsl] Applied attribute error

Subject: RE: [xsl] Applied attribute error
From: "JS rawat" <jrawat@xxxxxxxxxxxxxx>
Date: Mon, 24 Jan 2011 09:50:35 +0530
Thanks Imsieke, what a solution!!! 

-----Original Message-----
From: Imsieke, Gerrit, le-tex [mailto:gerrit.imsieke@xxxxxxxxx] 
Sent: Saturday, January 22, 2011 6:58 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Applied attribute error



On 22.01.2011 07:03, JS rawat wrote:
> Hi Team,
> Can anyone help me to find out the error(s) I am doing in the below 
> XSL. I want to do it by variable methodology by which i am getting<xref
ref=""/>.
>

This is because when processing @rid, the document being processed is the
variable $incidence whose root element is sc2. Since there is no fig with,
e.g., @id='FileName_fig1' below sc2, key() returns the empty sequence (in
XSLT2 terms).

If you are using XSLT2, you may introduce a global variable
   <xsl:variable name="root" select="/" as="document-node(element(doc))" />
and replace
   key('ids',.)
with
   key('ids',., $root)

My general impression is that your stylesheet looks more verbose than
necessary, but I didn't look into this very thoroughly.

-Gerrit

Current Thread