[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] generating ids across multiple source documents in xslt
I am looking for some help on the correct interpretation of the generate-id() function with multiple source documents. I am writing an xslt style sheet that combines multiple input documents into one output document. The original source document has references to other documents which in turn may have more references to more documents. Basically, it is a chain of href attributes. As part of the process I use the generate-id() function on the root of each input document and keep it on a stack so I can keep track of which documents have been processed. So in the code I have something like: <value-of select="generate-id(document($nextDocument))"/> I've run this style sheet with saxon and msxml4 and have had no problems. However, when I run this using dot net (xsltransform.transform), I've discovered that this statement generates the same id for the root nodes of all input documents. So if I have: <value-of select="generate-id(document('x.xml'))"/> <value-of select="generate-id(document('y.xml'))"/> Both of these statements generate the same id using dot net, but different ids using saxon and msxml4. The xslt spec says that the generate-id() fucntion should generate a unique id for every node. To me, since the root node of one document is a different node than the root of another document, I should get different ids. It should not matter that the nodes are in difference source documents. Is this a correct interpretation of the spec? I appreciate any thoughts. Phillip Engel ***************************************************************************** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. *****************************************************************************
|
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
|