[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: An interoperability problem?
On 15 May 2001, Norman Walsh wrote: > Imagine two processors, GreedyProc and LazyProc working on this > document: > > <?xml-stylesheet href="http://example.com/a.xsl" type="text/xsl"?> > <?xml-stylesheet href="http://example.com/b.xsl" type="text/xsl"?> > <!DOCTYPE doc PUBLIC "x"> > <doc/> > > When greedy encounters a stylesheet PI while parsing a document, it > immediately retrieves the stylesheet and compiles it. The parser in > the lazy processor has no special knowledge of the stylesheet PIs, so > it just puts them into the DOM for the document and the processor goes > looking for them there later, if it needs them. > > Now let's add an oasis-xml-catalog PI for myCat.xml, where myCat.xml > contains: > > <uri name="http://example.com/a.xsl" uri="file:///stylesheets/aPrime.xsl"/> > <uri name="http://example.com/b.xsl" uri="file:///stylesheets/bPrime.xsl"/> > > For the sake of argument, aPrime and bPrime are very different from a > and b on example.com. > > Here's the new document: > > <?xml-stylesheet href="a.xsl" type="text/xsl"?> > <?oasis-xml-catalog catalog="myCat.xml"?> > <?xml-stylesheet href="b.xsl" type="text/xsl"?> > <!DOCTYPE doc PUBLIC "x"> > <doc/> > > Now, the greedy processor is going to retrieve these stylesheets: > > http://example.com/a.xsl > file:///stylesheets/bPrime.xsl > > But the lazy processor is going to retrieve: > > file:///stylesheets/aPrime.xsl > file:///stylesheets/bPrime.xsl Why? The lazy processor should also be storing the catalog PI, and should keep the document order, and then take that order into account when processing the items that are affected by the presence of the catalog PI. So in this scenario, I'd say the lazy processor (which threw away, or didn't make use of, relevant information) is the incorrect processor. Lauren
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC