Re: validating instance against schema? (my first post to the list-:))
amol kat <[email protected]> Tue, 1 Jul 2003 11:12:29 +0530
| Newsgroups | gmane.comp.java.sun.xml.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C33FC1.A8E47B90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks a lot for the reply!
It works!
----- Original Message -----=20
From: amol kat=20
To: [email protected]=20
Sent: Friday, June 27, 2003 4:05 PM
Subject: Re: validating instance against schema? (my first post to the =
list-:))
Got the solution to this one...
http://wwws.sun.com/software/xml/developers/multischema/
Thanks,
Amol
----- Original Message -----=20
From: amol kat=20
To: [email protected]=20
Sent: Friday, June 27, 2003 11:24 AM
Subject: validating instance against schema? (my first post to the =
list-:))
Hi,
I want to validate my xml instance against the schema.
i want to do this programatically.
now one way i know of is to set the schema attribute in the document =
and apply a parser with validation set to true.
now my problem:
there may be 1000 instance documents of that schema which may be =
changing frequently in memory.
everytime if i validate using the above method, will the parser load =
the schema xsd from the file system? i think it will. and if it does, =
then the performance hit would be unacceptable.=20
isnt there a way in which all the "schema objects" can be created in =
memory once and used again and again for validating its corresponding =
instance documents?=20
something like a validate(oDocument:Document, =
oSchema:Schema):ValidationErrors api somewhere?=20
Thanks in advance,
Amol
------=_NextPart_000_0008_01C33FC1.A8E47B90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks a lot for the =
reply!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It works!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A [email protected] =
href=3D"mailto:[email protected]">amol=20
kat</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
[email protected]=20
=
href=3D"mailto:[email protected]">[email protected]</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, June 27, 2003 =
4:05 PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: validating =
instance against=20
schema? (my first post to the list-:))</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Got the solution to this =
one...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
=
href=3D"http://wwws.sun.com/software/xml/developers/multischema/">http://=
wwws.sun.com/software/xml/developers/multischema/</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Amol<A=20
=
href=3D"http://wwws.sun.com/software/xml/developers/multischema/"></A></F=
ONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A [email protected] =
href=3D"mailto:[email protected]">amol=20
kat</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
[email protected]=20
=
href=3D"mailto:[email protected]">[email protected]</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, June 27, 2003 =
11:24=20
AM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> validating instance =
against=20
schema? (my first post to the list-:))</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DVerdana size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>I want to validate my xml =
instance against=20
the schema.<BR>i want to do this programatically.<BR>now one way i =
know of=20
is to set the schema attribute in the document and apply a parser =
with=20
validation set to true.<BR>now my problem:<BR>there may be 1000 =
instance=20
documents of that schema which may be changing frequently in=20
memory.<BR>everytime if i validate using the above method, will the =
parser=20
load the schema xsd from the file system? i think it will. and if it =
does,=20
then the performance hit would be unacceptable. </FONT></DIV>
<P><FONT face=3DVerdana size=3D2>isnt there a way in which all the =
"schema=20
objects" can be created in memory once and used again and again for=20
validating its corresponding instance documents? </FONT>
<P><FONT face=3DVerdana size=3D2>something like a =
validate(oDocument:Document,=20
oSchema:Schema):ValidationErrors api somewhere? </FONT></P>
<DIV><FONT face=3DVerdana size=3D2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=3DVerdana=20
size=3D2>Amol</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0008_01C33FC1.A8E47B90--
-----------------------------------------------------
xml-interest: A list for discussing XML technologies in the Java Platform.
To post, mailto:[email protected]
Archives at: http://archives.java.sun.com/xml-interest.html
To unsubscribe, mailto:[email protected] the following message;
signoff xml-interest.