Re: rule context="X" semantic?

Pedro Salazar <[email protected]> 04 Mar 2004 16:36:27 +0000
Newsgroups gmane.text.xml.schematron
Message-ID <[email protected]>
On Thu, 2004-03-04 at 16:13, Oliver Becker wrote:
> > > Is there a default namespace declaration somewhere in between in
your
> > > XML data?
> > > 
> > 
> > Yes, there is - but only in the root element.
> 
> Then I'm surprised that your context="B" works. ;-)
> A default namespace declaration puts all elements without prefix into
> the specified namespace. However, a path expression doesn't use this
> default namespace. A path "B/C" *always* refers to elements B and C
> in the null namespace.
> 
> Solution: declare a prefix for the namespace in the schematron schema.
> e.g. in your XML there is ... xmlns="http://some.uri"
> then in your Schematron you have to add 
> <ns uri="http://some.uri" prefix="foo" />
> (I believe ...; you may use instead of "foo" something better)
> and replace in all paths the unprefixed with prefixed elements:
> context="foo:B/foo:C"
>    test="@bar=../../foo:V/@baz">
> etc.
>    

I found the buggy here.

I have my schematron rules divided by several patterns. However, the
patterns by them selfs are quite large, with about 20 rules each?...

So, I was trying to pick the rule with bug and put it on a separated
file (isolated from the others) to show you. Strange but isolated it
worked!! So, I picked that rule and I put it on the top of my pattern
element. What happened? - I worked too!!

It appears that there is some kind of overflow. Can you confirm this
behavior? If you want I may send you may case sample.

regards,
Pedro Salazar.    
-- 
-PS



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click