Importing the XML Schema namespace?

Discussion in 'XML' started by Arndt Jonasson, Feb 28, 2007.

  1. Let's say an XML Schema schema A uses types from another schema B.
    Then, if I understand things correctly, A needs to import schema B
    (maybe "importing its namespace" is more correctly put). It is also
    allowed for both A and B to import the XML Schema namespace, but at
    least when I use the xmllint validator, it isn't necessary.

    My question is, is it ever necessary to import the XML Schema
    namespace? If not necessary, when might it be useful?
    Arndt Jonasson, Feb 28, 2007
    #1
    1. Advertising

  2. Arndt Jonasson

    Guest

    On 28 Feb, 09:08, "Arndt Jonasson" <> wrote:
    > My question is, is it ever necessary to import the XML Schema
    > namespace? If not necessary, when might it be useful?


    No, you don't need to import the XML schema namespace to make use of
    it.

    The only situation where you might want to do that is if you want your
    XML instances to contain XML schema definitions such as in WSDL
    files.

    Even then you probably want to do something like:

    <xs:any namespace='http://www.w3.org/2001/XMLSchema' ...>

    rather than importing XSD.

    HTH,

    Pete.
    --
    =============================================
    Pete Cordell
    Tech-Know-Ware Ltd
    for XML to C++ data binding visit
    http://www.tech-know-ware.com/lmx/
    http://www.codalogic.com/lmx/
    =============================================
    , Feb 28, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,497
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,170
    Stanimir Stamenkov
    Apr 25, 2005
  3. Replies:
    1
    Views:
    501
    George Bina
    Jul 20, 2006
  4. Replies:
    3
    Views:
    2,796
  5. Boris Ozegovic

    XML schema, importing another schema

    Boris Ozegovic, May 6, 2008, in forum: XML
    Replies:
    1
    Views:
    423
    Martin Honnen
    May 6, 2008
Loading...

Share This Page