467,877 Members | 1,079 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Xerces schema validation

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
Jul 20 '05 #1
  • viewed: 3443
Share:
1 Reply
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/sch...schemaLocation
point to your schema. See http://xml.apache.org/xerces2-j/features.html for
details.
Flo
"Ole Hedegaard" <ol***@tdc.dk> schrieb im Newsbeitrag
news:3f*********************@dread11.news.tele.dk. ..
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by aralvarez_nospam_at_gmail.com change _nospam_at_ | last post: by
1 post views Thread by Nuno | last post: by
2 posts views Thread by Boris Kolpackov | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.