Xerces schema validation

Discussion in 'XML' started by Ole Hedegaard, Nov 25, 2003.

  1. Hi,

    I've been looking into the Xerces documentation, and to my surprise it seems
    that it is impossible to validate an XML document againts an XML Schema
    without having a schemaLocation (or noNameSpaceSchemaLocation) reference in
    the XML document. I basically just want to validate some "foreign" XML,
    which I did not generate myself, against my own Schemas.

    Is that really impossible with Xerces, or am I missing something?

    Thanks,
    Ole Hedegaard
    Ole Hedegaard, Nov 25, 2003
    #1
    1. Advertising

  2. Of course it's possible. You have to turn on feature
    http://apache.org/xml/features/validation/schema
    and let property
    http://apache.org/xml/properties/schema/external-schemaLocation
    point to your schema. See http://xml.apache.org/xerces2-j/features.html for
    details.
    Flo


    "Ole Hedegaard" <> schrieb im Newsbeitrag
    news:3fc3c7f0$0$148$...
    > Hi,
    >
    > I've been looking into the Xerces documentation, and to my surprise it

    seems
    > that it is impossible to validate an XML document againts an XML Schema
    > without having a schemaLocation (or noNameSpaceSchemaLocation) reference

    in
    > the XML document. I basically just want to validate some "foreign" XML,
    > which I did not generate myself, against my own Schemas.
    >
    > Is that really impossible with Xerces, or am I missing something?
    >
    > Thanks,
    > Ole Hedegaard
    >
    >
    Florian Deissenboeck, Nov 27, 2003
    #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. Ole Hedegaard

    Xerces schema validation

    Ole Hedegaard, Nov 25, 2003, in forum: Java
    Replies:
    2
    Views:
    927
    Esmond Pitt
    Nov 26, 2003
  2. Markus
    Replies:
    1
    Views:
    1,528
    Markus
    Nov 23, 2005
  3. Olaf Meyer
    Replies:
    2
    Views:
    687
    Olaf Meyer
    Jan 15, 2004
  4. Grand Apeiron
    Replies:
    7
    Views:
    1,749
    Peter Flynn
    Jan 20, 2004
  5. Vikas
    Replies:
    0
    Views:
    595
    Vikas
    Feb 5, 2004
Loading...

Share This Page