[Mono-list] XSLT Problems
Atsushi Eno
ginga@kit.hi-ho.ne.jp
Sat, 05 Jul 2003 15:07:20 +0900
This is a multi-part message in MIME format.
--------------050009040508070702060702
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Hello,
>I have some XML and an XSL file to transform that into some HTML output. Deep
>within the program I am converting is a call to transform the XML using the
>XSL file provided. If I perform the transform from the command line with
>xsltproc then it all works, but the code using C# fails. Output is below:
>
>
>Entity: line 1: warning: Namespace prefix xsl is not defined
>encoding="utf-8"?><xsl:stylesheet version="1.0"><xsl:import
>href="DeepCopy.xsl"
>
>
It seems related to recent changes of XPathNavigator implementation classes.
I would ask to try attached patch and tell me the result (unfortunately
I cannot
test it on cygwin since XslTransform.Load() fails to load stylesheets at
xmlCleanupParser()...)
Since former XPathNavigator did not ignore xmlns attributes and actually
write
those attributes got from MoveTo*Attribute() instead of MoveTo*Namespace().
(Note that it was no other way for XslTransform since previous
XPathNavigator
implementation did not support MoveTo*Namespace()).
Regards,
Atsushi Eno
--------------050009040508070702060702
Content-Type: text/plain;
name="xsltransform0705.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="xsltransform0705.patch"
SW5kZXg6IFN5c3RlbS5YbWwuWHNsL1hzbFRyYW5zZm9ybS5jcw0KPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0K
UkNTIGZpbGU6IC9jdnMvcHVibGljL21jcy9jbGFzcy9TeXN0ZW0uWE1ML1N5c3RlbS5YbWwu
WHNsL1hzbFRyYW5zZm9ybS5jcyx2DQpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMjQNCmRpZmYg
LXUgLXIxLjI0IFhzbFRyYW5zZm9ybS5jcw0KLS0tIFN5c3RlbS5YbWwuWHNsL1hzbFRyYW5z
Zm9ybS5jcwkyIEp1bCAyMDAzIDEyOjIzOjA0IC0wMDAwCTEuMjQNCisrKyBTeXN0ZW0uW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