xsl-list
[Top] [All Lists]

[xsl] issue with cross referencing

2006-10-11 09:30:24
Hi all:

Have an issue with cross referencing.

I have some text:

1. First line
   A. second line
   B. thrisd line
2. Cross ref to 1 A.

The xml would be

<step1 id="s1">
   <text>First line here</text>

<step2 id="s2">
   <text>Second line</text>
  <step3 id="s3">
    <text>Third line</text>
  </step3>
</step2>

</step1>
<step1 id="s4">
<text>Cross ref thru <xref xrefid="s1"/> <xref
xrefid="s2"/><xref

Now, on my style sheet I have used keys to resolve it
like this:

<xsl:key name="steps" match="*[(_at_)id]" use="@id"/>

<xsl:template match="xref">
        <xsl:for-each select="key('steps',@xrefid)">
        <xsl:number count="step1" format="1"/>
       </xsl:for-each>
</xsl:template>

While I would expect Cross ref to 1 A, I am getting 
Cross ref to 1 1

How do I make the number formatting to point to and
say A, B or whtever the level is? 

Thank you in advance for all your help. 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--