[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Processing IDREFS attributes
At 2005-11-01 16:08 -0800, Dan Vint wrote:
below That turns out to be irrelevant ... only the ID declarations are required. The string or node set that you supply to the id() function can be anything. then you should be able to say: To add a space separator between each of the ID values ... without it your result tree would just get a string of concatenated letters. I thought your intention was to report the unique ID values from the IDREF pointers. 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> 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. In my original code I had this as well, trying to get to the content of the element referenced, but nothing was being output, so I used the current value just to see if anything was being looked up. That just supplies the value of the current node to the id() function for tokenization and lookup. Any string or node can be passed to the function. I sort of see why adding the /@id to the for-each select worked, but I don't know why mine didn't work or like you said didn't give me all the content. I can't see why either ... are your referenced elements empty? Do they perhaps have an echo of the id= value in the element content? Anyway ... it sounds like you are up and running now. . . . . . . . . . . . . Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|