Hi Willem, The ns attribute is inherited from the nearest ancestor, that means from the grammar element in your second example, see rule 9: http://www.relaxng.org/spec-20011203.html#IDAEBZR The refs are expanded later, see rule 19 http://www.relaxng.org/spec-20011203.html#define-ref
The rules are applied in order, see: http://www.relaxng.org/spec-20011203.html#simplification that means rule 9 is applied before 19. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com willem.vanheerde wrote: > --- In [email protected], "Dave Pawson" <[EMAIL PROTECTED]> wrote: >> 2008/6/30 willem.vanheerde <[EMAIL PROTECTED]>: >>> Hi there, >>> >>> I have a question about the default namespace >>> attribute ns. >>> Is this inherited when using define? >> Yes, see the namespaces in xml recommendation. >> http://www.w3.org/TR/REC-xml-names/#defaulting >> >> The scope of a default namespace declaration extends from the >> beginning of the start-tag in which it appears to the end of the >> corresponding end-tag, excluding the scope of any inner default >> namespace declarations. >> >> regards >> >> -- >> Dave Pawson >> XSLT XSL-FO FAQ. >> http://www.dpawson.co.uk >> > > Oke, that is for the default namespace declarations with xmlns. > > But how about the relax-ng ns attribute. > In my second example I expected that the ns attribute declaration on > the <start> element would also be active for the > definitions in the <define> element; so the element "test" > would also have no namespace. > > I would expect that replacing all the <ref> elements > with the content of the corresponding <define> elements > should make no difference. > But this a wrong assumption? > > Hope you can clarify this. > > Regards, > > Willem. > > > ------------------------------------ > > Yahoo! Groups Links > > >
