Namespace validation error

Discussion in 'XML' started by hooker@org.com.net.au.nz.it, Oct 24, 2003.

  1. Guest

    I'm building an XML file and associated schema using Roger Costello's
    excellent reference and various online resources. The XML validates fine
    as long as I don't turn on name space validation (i.e. the XML itself is
    well formed as long as the schema is ignored).

    I downloaded Sun's freestanding java validator so that I could work locally
    instead of hitting the validation sites quite as much as I was doing. Hitting
    my head against the wall however, hasn't stopped :)

    The first few lines of the XML file look like this :

    <?xml version="1.0"?>
    <ConstellationNames
    xmlns="http://www.hooksprogress.org"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.hooksprogress.org C.xs">

    Running the Sun validator I get :

    start parsing a grammar.
    element "ConstellationNames" is not allowed here
    5:68@http://www.hooksprogress.org/C.xml
    perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
    5:68@http://www.hooksprogress.org/C.xml
    failed to load a grammar.

    and it hasn't tried to fetch the stylesheet. According to the online
    examples that I can find (as well as Costello's powerpoint doc) what
    I've done looks correct, although it clearly isn't.

    Ideas? Please ?

    --
    The Hooker
    Telepath wanted. You know where to apply.
    [ www.sfwrg.org - SF Writers Resource Guide ]
    [ www.pubfun.com - WA's best entertainment guide ]
    hooker at pubfun dot com
    , Oct 24, 2003
    #1
    1. Advertising

  2. In article <3f98edac$0$23586$>,
    <> wrote:

    ><ConstellationNames
    > xmlns="http://www.hooksprogress.org"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xsi:noNamespaceSchemaLocation="http://www.hooksprogress.org C.xs">


    You have xsi:noNamespaceSchemaLocation where you mean xsi:schemaLocation.

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
    Richard Tobin, Oct 24, 2003
    #2
    1. Advertising

  3. Guest

    Richard Tobin <> spake thusly :
    > In article <3f98edac$0$23586$>,
    > <> wrote:


    >><ConstellationNames
    >> xmlns="http://www.hooksprogress.org"
    >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >> xsi:noNamespaceSchemaLocation="http://www.hooksprogress.org C.xs">


    > You have xsi:noNamespaceSchemaLocation where you mean xsi:schemaLocation.


    'Fraid not Richard - I've tried that (and done it again just now as a check).
    Same errors.

    --
    The Hooker
    Telepath wanted. You know where to apply.
    [ www.sfwrg.org - SF Writers Resource Guide ]
    [ www.pubfun.com - WA's best entertainment guide ]
    hooker at pubfun dot com
    , Oct 24, 2003
    #3
  4. In article <3f992bf4$0$23601$>,
    <> wrote:

    >> You have xsi:noNamespaceSchemaLocation where you mean xsi:schemaLocation.


    >'Fraid not Richard - I've tried that (and done it again just now as a check).
    >Same errors.


    Well, that *does* need to be changed, but evidently you have some other
    problem too.

    The messages:

    start parsing a grammar.
    element "ConstellationNames" is not allowed here
    5:68@http://www.hooksprogress.org/C.xml
    perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
    5:68@http://www.hooksprogress.org/C.xml
    failed to load a grammar.

    suggest that maybe it is trying to read the document itself as a schema.
    Have you checked the arguments to the validator?

    -- Richard

    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
    Richard Tobin, Oct 24, 2003
    #4
  5. Guest

    Richard Tobin <> spake thusly :
    > Well, that *does* need to be changed, but evidently you have some other
    > problem too.


    > The messages:


    > start parsing a grammar.
    > element "ConstellationNames" is not allowed here
    > 5:68@http://www.hooksprogress.org/C.xml
    > perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
    > 5:68@http://www.hooksprogress.org/C.xml
    > failed to load a grammar.


    > suggest that maybe it is trying to read the document itself as a schema.
    > Have you checked the arguments to the validator?


    Aaarrrrgggghhh ! Thank you Richard, you're right.

    You either give the validator a single parameter (which must be the schema)
    or 2, the schema first followed by the XML file.

    Sorry for wasting peoples time, and in future I'll RTFM a little better :)

    --
    The Hooker
    Telepath wanted. You know where to apply.
    [ www.sfwrg.org - SF Writers Resource Guide ]
    [ www.pubfun.com - WA's best entertainment guide ]
    hooker at pubfun dot com
    , Oct 25, 2003
    #5
    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. Èý¹â
    Replies:
    1
    Views:
    565
    William F. Robertson, Jr.
    Jul 29, 2003
  2. Replies:
    0
    Views:
    5,127
  3. Anonymous
    Replies:
    3
    Views:
    529
    Ron Natalie
    Aug 18, 2003
  4. Jason Heyes
    Replies:
    1
    Views:
    448
    Woebegone
    Nov 19, 2004
  5. Petter Reinholdtsen
    Replies:
    9
    Views:
    4,354
    Howard
    Nov 29, 2004
Loading...

Share This Page