Subject: Re: [xsl] Processing IDREFS attributes From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 02 Nov 2005 09:39:46 -0500 |
then you should be able to say:
<xsl:for-each select="id(@references)/@id"> <xsl:if test="position()>1"> </xsl:if> <xsl:value-of select="."/> </xsl:for-each>
A slight twist on this does what I wanted, which was to go find the element that has the ID:
<xsl:for-each select="id(@references)/@id"> <xsl:value-of select="id(.)"/> </xsl:for-each>
This produces the content of the element with the assigned ID. Without it, I just got the id value.
<xsl:for-each select="id(@references)"> <xsl:value-of select="."/> </xsl:for-each>
With my original code with added context: <xsl:templete match='foo'> <xsl:for-each select="id(@references)"> <xsl:value-of select="."/> </xsl:for-each> </xsl:template>
It didn't loop for one problem, so there was only a single output, instead of two values as I expected. The output was just the same value as my @references content.
I can't fathom what is going on and why the @references is just being repeated ... that code should have given you the concatenated string values of the elements whose ID typed attribute has a value in the tokenized set of values of the @reference node.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Processing IDREFS attribu, G. Ken Holman | Thread | [xsl] Default namespace in XML docu, Kevin L.. Cobb |
Re: [xsl] Using document() for mult, andrew welch | Date | Re: [xsl] Found the problem : Re: [, Wendell Piez |
Month |