Bug 4434 - XslStyleSheet incorrectly detects included stylesheet as simplified if second element isn't from xsl namespace
Summary: XslStyleSheet incorrectly detects included stylesheet as simplified if second...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-13 21:29 UTC by Csaba Halász
Modified: 2013-08-09 06:48 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
test case (1.30 KB, application/octet-stream)
2012-04-13 21:29 UTC, Csaba Halász
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Csaba Halász 2012-04-13 21:29:15 UTC
Created attachment 1668 [details]
test case

Apparently XslStyleSheet.HandleImportsInInclude moves the input navigator from the root <xsl:stylesheet> element, so when later HandleInclude() checks the namespace to see if it is a simplified stylesheet it is checking the wrong node.

In the attached test case, you will get an exception saying "Could not resolve named template foo." because the included stylesheet is processed as simplified.
If you remove the <doc:template name='foo' /> it will work because then the first two nodes will both have xsl namespace so it will correctly be processed as a normal stylesheet.

Tested with 2.10.8.1 and git 8b1ef452.
Comment 1 Atsushi Eno 2013-08-09 06:48:11 UTC
Fixed in git master [b62bb26]. Thanks for the simple repro.