Loading ...
Sorry, an error occurred while loading the content.
 

Re: Inherit default namespace ns

Expand Messages
  • willem.vanheerde
    ... 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
    Message 1 of 5 , Jul 1, 2008
      --- In rng-users@yahoogroups.com, "Dave Pawson" <dave.pawson@...> wrote:
      >
      > 2008/6/30 willem.vanheerde <willem.van.heerde@...>:
      > > 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.
    • George Cristian Bina
      Hi Willem, The ns attribute is inherited from the nearest ancestor, that means from the grammar element in your second example, see rule 9:
      Message 2 of 5 , Jul 1, 2008
        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 rng-users@yahoogroups.com, "Dave Pawson" <dave.pawson@...> wrote:
        >> 2008/6/30 willem.vanheerde <willem.van.heerde@...>:
        >>> 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
        >
        >
        >
      • willem.vanheerde
        ... from ... Hi George, Thanx for the answer! I understand now. Best Regards, Willem.
        Message 3 of 5 , Jul 1, 2008
          --- In rng-users@yahoogroups.com, George Cristian Bina <george@...> wrote:
          >
          > 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 rng-users@yahoogroups.com, "Dave Pawson" <dave.pawson@> wrote:
          > >> 2008/6/30 willem.vanheerde <willem.van.heerde@>:
          > >>> 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
          > >
          > >
          > >
          >

          Hi George,

          Thanx for the answer!
          I understand now.

          Best Regards,
          Willem.
        Your message has been successfully submitted and would be delivered to recipients shortly.