On Tuesday 07 September 2010 12:40:43 Michael Ludwig wrote: > Your expectation is substantiated, but Xalan does not (yet) support this > neat feature. Check out the following page: > > Xalan-J 2.7.1: document() function disregards URI fragment identifier > http://marc.info/?l=xalan-j-users&m=123866295117812
Thanks for helping me understand. Can I infer that a patch addressing this issue would be welcome? > Can't say as I haven't see the URLs you're calling. You could help Xalan > by doing the call once and storing the node-set in a variable: > > <xsl:variable name="my-uri" select="'some/relative/path/to/doc.xml'"/> > <xsl:variable name="my-doc" select="document( $my-uri )/*"/> I think my original description was not sufficiently clear. What I meant to say is that when the multiple fragments of the same document are requested, the main document is downloaded each time. For example: <xsl:variable name ="derive" select="http://taxonomies.xbrl.us/us- gaap/2009/elts/us-gaap-2009-01-31.xsd#us- gaap_DerivativeGainLossOnDerivativeNetAbstract" /> <xsl:variable name="my-doc" select="document($derive)/*"/> <xsl:variable name="changees" select="http://taxonomies.xbrl.us/us- gaap/2009/elts/us-gaap-2009-01-31.xsd#us- gaap_ScheduleOfNewAccountingPronouncementsAndChangesInAccountingPrinciplesTextBlock"/> <xsl:variable name="yet-another" select="document($changees)/* /> The above code will download the same file (http://taxonomies.xbrl.us/us- gaap/2009/elts/us-gaap-2009-01-31.xsd) twice. After looking over the link you sent, Xalan must be treating them as separate documents since it doesn't know how to deal with document fragments. Presumably adding URI fragment support would also include caching the main document so as to prevent multiple downloads of the same document. Thanks for your reply, it was very helpful. Regards, Mark Gannon -- We are what we pretend to be, so we must be careful what we pretend to be. ~Kurt Vonnegut
signature.asc
Description: This is a digitally signed message part.