[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Processing IDREFS attributes

Subject: Re: Processing IDREFS attributes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Nov 2005 09:39:46 -0500
Re:  Processing IDREFS attributes
Hi,

I'd like to know which processor Dan is running.

At 10:52 PM 11/1/2005, Ken wrote:
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.

This could be


<xsl:for-each select="id(@references)">
  <xsl:value-of select="."/>
</xsl:for-each>

couldn't it? Since you're no longer reporting the value of the attribute (as Ken was), no need to traverse there (and then call id() again).

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.

That's why I'd like to know which processor this is, to try and reproduce this.


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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.