|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Processing IDREFS attributes
below
At 02:23 PM 11/1/2005, you wrote: *If* you have properly declared the id attributes, for my example they are called id=, something along the lines of: Yes and I had the references defined as IDREFS #IMPLIED as well. then you should be able to say: A slight twist on this does what I wanted, which was to go find the element that has the ID: This produces the content of the element with the assigned ID. Without it, I just got the id value. I'm not sure why you have the position test, can you explain that? 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. 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. <xsl:value-of select="id(.)"/> and it would report a space-separated list of unique token values (rather than just @references since that might have duplicates). Yep, had that problem covered. I hope this helps, Dan. Yes, once again you have come to the rescue. 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. ..dan --------------------------------------------------------------------------- Danny Vint Specializing in Panoramic Images of California and the West http://www.dvint.com voice: 510-522-4703 When H.H. Bennett was asked why he preferred to be out shooting landscapes rather than spending time in his portrait studio: "It is easier to pose nature and less trouble to please." http://www.portalwisconsin.org/bennett_feature.cfm
|
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
|

Cart








