Subject:SS4.5 build 103m: error with PI Author:Hans-Peter Küchler Date:13 Jan 2003 12:18 PM
Hi,
please open the project test.prj. Open test.xsl. There are two scenarios, 'Debug' and 'Saxon'. There are two processing instructions in test.xml. With scenario 'Saxon', the result contains one PI (as expected). With scenario 'Debug' (SS4 internal processor) the result contains two PI's (wrong?).
With both scenarios the template match="h4" is never reached, but the template match="*[name()='h5']" is reached. Why is match="h4" never reached? Is this an error?
Subject:Re: SS4.5 build 103m: error with PI Author:Minollo I. Date:13 Jan 2003 12:35 PM
Both problems are generated by the default namespace declaration in
test.xml; the first one is a bug in Stylus built-in processor, that we are
fixing. The second is a bug in your stylesheet.
What you should do to fix your stylesheet is to add the definition of a
namespace in the stylesheet pointing to your default namespace URI used in
the XML file; something like:
xmlns:a="http://www.w3.org/1999/xhtml"
Then you should change match="h4" into match="a:h4"; that will work fine.
name()='h5' works because name() doesn't include the namespace name.
About the processing instruction, Stylus Studio is making the mistake to
match the PIs taking into account the default namespace declared in the XML
document, which is wrong. If you change 'special' into 'a:special' (where a
is the same as discussed above), things will work in Stylus; but that, as
mentioned, is wrong.
Subject:Re: SS4.5 build 103m: error with PI Author:Minollo I. Date:21 Jan 2003 01:26 PM
>...
>About the processing instruction, Stylus Studio is making the mistake to
>match the PIs taking into account the default namespace declared in the XML
>document, which is wrong. If you change 'special' into 'a:special' (where a
>is the same as discussed above), things will work in Stylus; but that, as
>mentioned, is wrong.
A fix for this problem is now available in 4.5 BL103n. You can download the
updated build from: http://www.stylusstudio.com/update (4.5 section)