|
The testcase has three stylesheet modules:
path1/sheet1.xsl path1/path2/sheet2.xsl path1/path2/path3/sheet3.xsl sheet1.xsl has: <xsl:import href="path2/sheet2.xsl"/> sheet2.xsl has: <xsl:import href="path3/sheet3.xsl"/> With your own URI resolver set, to resolve path2/sheet2.xsl the URI resolver gets called with an href of path2/sheet2.xsl and base of the primary stylesheet (OK). Then from within sheet2.xsl the resolver gets called again to resolve path3/sheet3.xsl, with an href of path2/sheet2.xsl and base of the primary stylesheet (WRONG). The base uri at this point should be the absolute URI of sheet2.xsl, not the absolute URI of the primary sheet1.xsl Then the Attaching 2297.zip with the testcase, including test./Test1URIResolver.java
In my previous comment I had a typo with path2 vs. path3. I meant to write this:
With your own URI resolver set, to resolve path2/sheet2.xsl the URI resolver gets called with an href of path2/sheet2.xsl and base of the primary stylesheet (OK). Then from within sheet2.xsl the resolver gets called again to resolve path3/sheet3.xsl, with an href of path3/sheet3.xsl and base of the primary stylesheet (WRONG). The base uri at this point should be the absolute URI of sheet2.xsl, not the absolute URI of the primary sheet1.xsl Attaching patch2, which is the original patch plus changes related to xalanj-2274 that resolve
problems with the base URI inside of external general parsed entities. The complete fix for xalanj-2274 is bigger than this second patch, but this resolves the issues related to the base URI and parsed entities. Christine Li has agreed to review this patch, although she wants the part of the patch related to xalanj-2274 to be moved out of this issue and into the other one. (Brian M. will make that happen).
This issue was triaged on July 11, 2006
Attaching patch3, which is a subset of patch2.
Other parts of patch2 will be moved as a patch under XALANJ-2274. This is being done under the reviewers request (Christine Li). I have to agree, 2274 is a different bug. Attaching patch4, addressing Christine Li's review.
Thanks to Christine for getting me to clean up the patch by: > extracting remaining changes associated with XALANJ-2274 > getting me to put all push/pop of base URI inside the process() method in neatly bracketed from (rather than push/pop in both the process() and in startElement) I'm hoping that Christine's approval of patch4 is next. Note that the attached testcase fails with a file not found exception on sheet3.xsl when the patch is not applied, but has no problems once the patch is applied. The patch looks good. It resolves the reported problem.
Resolved, I just applied patch4 to the code base.
This issue is no longer relevant for 2.7.1, it is fixed in 2.7.1.
Changing the affected version to 2.7. Would the originator of this issue please verify that this issue is fixed in the 2.7.1 release, by adding a comment to this issue, so that we can close this issue.
A lack of response by February 1, 2008 will be taken as consent that we can close this resolved issue. Regards, Brian Minchau |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This patch simply pushes the base URI of the included or imported stylesheet module onto the stack, and pops it off when done parsing the <xsl:import /> or <xsl:include />. This keeps the stack, especially the top of the stack more up to date.
Testcase to be attached soon.