Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xerces schema validation

Reply
Thread Tools

Xerces schema validation

 
 
Ole Hedegaard
Guest
Posts: n/a
 
      11-25-2003
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


 
Reply With Quote
 
 
 
 
Florian Deissenboeck
Guest
Posts: n/a
 
      11-27-2003
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" <(E-Mail Removed)> schrieb im Newsbeitrag
news:3fc3c7f0$0$148$(E-Mail Removed). ..
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Schema validation using Xerces-C++ version 1.6.0? Vikas XML 0 02-06-2004 02:31 PM
Schema validation using Xerces-C++ version 1.6.0? Vikas XML 0 02-05-2004 11:11 PM
Newbie problem?: XML-Schema Instance Validation (xerces 2.6.0, confusingcvc-complex-type errors) Grand Apeiron XML 7 01-20-2004 12:04 AM
Xerces 2.6 and validation of XML schema constraints Olaf Meyer XML 2 01-15-2004 06:50 PM
Xerces schema validation Ole Hedegaard Java 2 11-26-2003 10:09 PM



Advertisments