Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Schema Validator
Schema Validator [message #26023] Mon, 04 August 2003 14:50 Go to next message
Eclipse User
Originally posted by: cipher8000.yahoo.com

Hi Ed,

Is there any sample for using external Schema Validator with XSDSchema
object? I am thinking of using Xerces or Sun's MSV Validator.

i guess, i can get the real Element from XSDSchema and use that Element with
these validator? but is there any better way of doing this.

-muruga
Re: Schema Validator [message #26063 is a reply to message #26023] Mon, 04 August 2003 15:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Muruga,

XSD supports validation directly:


http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)

Validation involves loading many schema documents, and I don't think there is an
easy way to feed all the already loaded documents of the XSD model into some
other validator. You'd have to look to those other tools for ways to drive
schema documents into them...


Muruga wrote:

> Hi Ed,
>
> Is there any sample for using external Schema Validator with XSDSchema
> object? I am thinking of using Xerces or Sun's MSV Validator.
>
> i guess, i can get the real Element from XSDSchema and use that Element with
> these validator? but is there any better way of doing this.
>
> -muruga
Re: Schema Validator [message #26104 is a reply to message #26063] Mon, 04 August 2003 15:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: cipher8000.yahoo.com

Hi Ed,

Thanks for the link..It was my mistake, i didn't explain it correctly.

I wanted to validate an XML document (instance) against a XSDSchema. I have
XSDSchema objects constructed and i received an XML document. Now i want to
pass these XSDSchema & XML document to an Validator which can validate

Looked at Xerces Schema Validator..which takes String version of XSD and
String version of XML document for validation.

-muruga

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F2EAE44.E13ED457@ca.ibm.com...
Muruga,

XSD supports validation directly:


http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javado
c/org/eclipse/xsd/util/XSDPrototypicalSchema.html#printSchem a(java.lang.Stri
ng)

Validation involves loading many schema documents, and I don't think there
is an
easy way to feed all the already loaded documents of the XSD model into some
other validator. You'd have to look to those other tools for ways to drive
schema documents into them...


Muruga wrote:

> Hi Ed,
>
> Is there any sample for using external Schema Validator with XSDSchema
> object? I am thinking of using Xerces or Sun's MSV Validator.
>
> i guess, i can get the real Element from XSDSchema and use that Element
with
> these validator? but is there any better way of doing this.
>
> -muruga
Re: Schema Validator [message #26144 is a reply to message #26104] Tue, 05 August 2003 08:02 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

Muruga,

That makes more sense. ;-)

As far as Xerces goes, the only way I know of to drive validation is to provide
InputSources which will load everything that's needed from those.

I've been wanting to provide direct support for (incremental) instance
validation with the XSD model too, but I just haven't had time and probably
won't have time for a while at least. The model already supports direct
validation of simple types via XSDSimpleTypeDefinition.assess and
XSDEditor.GenericXMLResourceImpl.doLoad contains code that shows how complex
content can be validated, but more needs to be done to fully validate complex
content...


Muruga Chinnananchi wrote:

> Hi Ed,
>
> Thanks for the link..It was my mistake, i didn't explain it correctly.
>
> I wanted to validate an XML document (instance) against a XSDSchema. I have
> XSDSchema objects constructed and i received an XML document. Now i want to
> pass these XSDSchema & XML document to an Validator which can validate
>
> Looked at Xerces Schema Validator..which takes String version of XSD and
> String version of XML document for validation.
>
> -muruga
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F2EAE44.E13ED457@ca.ibm.com...
> Muruga,
>
> XSD supports validation directly:
>
> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javado
> c/org/eclipse/xsd/util/XSDPrototypicalSchema.html#printSchem a(java.lang.Stri
> ng)
>
> Validation involves loading many schema documents, and I don't think there
> is an
> easy way to feed all the already loaded documents of the XSD model into some
> other validator. You'd have to look to those other tools for ways to drive
> schema documents into them...
>
> Muruga wrote:
>
> > Hi Ed,
> >
> > Is there any sample for using external Schema Validator with XSDSchema
> > object? I am thinking of using Xerces or Sun's MSV Validator.
> >
> > i guess, i can get the real Element from XSDSchema and use that Element
> with
> > these validator? but is there any better way of doing this.
> >
> > -muruga
Re: Schema Validator [message #575564 is a reply to message #26023] Mon, 04 August 2003 15:04 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25945
Registered: July 2009
Senior Member
Muruga,

XSD supports validation directly:


http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javadoc/org/eclipse/xsd/util/XSDPrototypicalSchema .html#printSchema(java.lang.String)

Validation involves loading many schema documents, and I don't think there is an
easy way to feed all the already loaded documents of the XSD model into some
other validator. You'd have to look to those other tools for ways to drive
schema documents into them...


Muruga wrote:

> Hi Ed,
>
> Is there any sample for using external Schema Validator with XSDSchema
> object? I am thinking of using Xerces or Sun's MSV Validator.
>
> i guess, i can get the real Element from XSDSchema and use that Element with
> these validator? but is there any better way of doing this.
>
> -muruga
Re: Schema Validator [message #575593 is a reply to message #26063] Mon, 04 August 2003 15:30 Go to previous message
Eclipse User
Originally posted by: cipher8000.yahoo.com

Hi Ed,

Thanks for the link..It was my mistake, i didn't explain it correctly.

I wanted to validate an XML document (instance) against a XSDSchema. I have
XSDSchema objects constructed and i received an XML document. Now i want to
pass these XSDSchema & XML document to an Validator which can validate

Looked at Xerces Schema Validator..which takes String version of XSD and
String version of XML document for validation.

-muruga

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3F2EAE44.E13ED457@ca.ibm.com...
Muruga,

XSD supports validation directly:


http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javado
c/org/eclipse/xsd/util/XSDPrototypicalSchema.html#printSchem a(java.lang.Stri
ng)

Validation involves loading many schema documents, and I don't think there
is an
easy way to feed all the already loaded documents of the XSD model into some
other validator. You'd have to look to those other tools for ways to drive
schema documents into them...


Muruga wrote:

> Hi Ed,
>
> Is there any sample for using external Schema Validator with XSDSchema
> object? I am thinking of using Xerces or Sun's MSV Validator.
>
> i guess, i can get the real Element from XSDSchema and use that Element
with
> these validator? but is there any better way of doing this.
>
> -muruga
Re: Schema Validator [message #575634 is a reply to message #26104] Tue, 05 August 2003 08:02 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25945
Registered: July 2009
Senior Member
Muruga,

That makes more sense. ;-)

As far as Xerces goes, the only way I know of to drive validation is to provide
InputSources which will load everything that's needed from those.

I've been wanting to provide direct support for (incremental) instance
validation with the XSD model too, but I just haven't had time and probably
won't have time for a while at least. The model already supports direct
validation of simple types via XSDSimpleTypeDefinition.assess and
XSDEditor.GenericXMLResourceImpl.doLoad contains code that shows how complex
content can be validated, but more needs to be done to fully validate complex
content...


Muruga Chinnananchi wrote:

> Hi Ed,
>
> Thanks for the link..It was my mistake, i didn't explain it correctly.
>
> I wanted to validate an XML document (instance) against a XSDSchema. I have
> XSDSchema objects constructed and i received an XML document. Now i want to
> pass these XSDSchema & XML document to an Validator which can validate
>
> Looked at Xerces Schema Validator..which takes String version of XSD and
> String version of XML document for validation.
>
> -muruga
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3F2EAE44.E13ED457@ca.ibm.com...
> Muruga,
>
> XSD supports validation directly:
>
> http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/xsd- home/docs/javado
> c/org/eclipse/xsd/util/XSDPrototypicalSchema.html#printSchem a(java.lang.Stri
> ng)
>
> Validation involves loading many schema documents, and I don't think there
> is an
> easy way to feed all the already loaded documents of the XSD model into some
> other validator. You'd have to look to those other tools for ways to drive
> schema documents into them...
>
> Muruga wrote:
>
> > Hi Ed,
> >
> > Is there any sample for using external Schema Validator with XSDSchema
> > object? I am thinking of using Xerces or Sun's MSV Validator.
> >
> > i guess, i can get the real Element from XSDSchema and use that Element
> with
> > these validator? but is there any better way of doing this.
> >
> > -muruga
Previous Topic:Schema Validator
Next Topic:How to traverse sequence / element within ComplexType
Goto Forum:
  


Current Time: Wed Jul 30 11:28:52 EDT 2014

Powered by FUDForum. Page generated in 0.04323 seconds