You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Curtis Brown <cp...@iwant.com> on 2001/05/14 22:56:25 UTC

personal.xsd example won't validate

Using xerces 1.3.1, I try to run the DOMCount sample on the
personal.xsd file from the data subdir, but I get the following
errors:

bash-2.03$ java dom/DOMCount -v -n -s ~/xerces-1_3_1/data/personal.xsd 
[Error] personal.xsd:2:53: General Schema Error: Grammar with uri 2: http://www.w3.org/2000/10/XMLSchema , can not found.
[Error] personal.xsd:2:53: Element type "schema" must be declared.
[Error] personal.xsd:4:28: Element type "element" must be declared.
...

Has anyone been able to validate personal.xsd?  Does anyone have an
example of a schema that uses namespaces that also validates?

Thanks,
Curtis Brown
cpbrown@iwant.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: personal.xsd example won't validate

Posted by Curtis Brown <cp...@iwant.com>.
"John L. Utz III" <ut...@singingfish.com> writes:

> mr brown;
> 
> are you asking about validating XML *with* a schema ( as mr ashish alludes
> to in his response )
> 
> or are you asking about validating the *schema*, which is what i think you
> are asking about?
> 
> i thought that the beauty of schema is that you are supposed to be able to
> validate them.
> 
n
Yes, I want to validate the schema itself.  

> is there somebody here who can tell me how all of this is supposed to
> work?
> 
> 1. Can i validate a schema?
> 
> 2. if so, how do i validate it? against what?

You certainly can validate a schema, either against another schema (ie
an XML schema for XML schemas), or against a DTD for XML schemas.
I've been using the web interface to xsv at:
http://www.w3.org/2000/09/webdata/xsv, but I'd really like to to use xerces.  
Does anyone have a working example of a schema that uses namespaces
which xerces will validate?

Thanks,
Curtis Brown
cpbrown@iwant.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: personal.xsd example won't validate

Posted by "John L. Utz III" <ut...@singingfish.com>.
ian,

tnx for pointing this product out to me. it's pretty nice.

however, this exercise is turning out to be a fabulous example of the
pains of being an 'early adopter' :-)

xmlsqc supports the latest XMLSchema spec (2001) and xerces 131 supports
2000/10 :-)

running the xerces sample xsd generates the following error:

C:\XMLSQC>SQC c:\xerces-1_3_1\data\personal.xsd
Initializing Schema Quality Checker. Please wait ...
SchemaQualityChecker has been initialized
PROCESSING c:\xerces-1_3_1\data\personal.xsd time : 2001-05-15T10:39:12
...
c:\xerces-1_3_1\data\personal.xsd (file 1 of 1) now being read ...
ERROR
 file = null line 0 column 0
SEVERITY: 0
ERROR TYPE: 1
MESSAGE
The version of Schema Quality Checker you are running checks schema in the
http:
//www.w3.org/2001/XMLSchema" syntax. The schema located at
file:C:/xerces-1_3_1/
data/personal.xsd uses an earlier syntax. No checking can be performed on
this s
chema.


------------------------------------------------------------------------
end time = 2001-05-15T10:39:12



the next obvious hack is to simply change the schema reference from:

<schema xmlns='http://www.w3.org/2000/10/XMLSchema'>

to

<schema xmlns='http://www.w3.org/2001/XMLSchema'>


and then sad and unhappy things happen:

C:\XMLSQC>SQC c:\xerces-1_3_1\data\personal.xsd
Initializing Schema Quality Checker. Please wait ...
SchemaQualityChecker has been initialized
PROCESSING c:\xerces-1_3_1\data\personal.xsd time : 2001-05-15T10:42:05
...
c:\xerces-1_3_1\data\personal.xsd (file 1 of 1) now being read ...
ERROR
 file = file:C:/xerces-1_3_1/data/personal.xsd line 38 column 56
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "use" with value "default" must have a value from the list
"(prohibite
d|optional|required)".


------------------------------------------------------------------------
ERROR
 file = file:C:/xerces-1_3_1/data/personal.xsd line 38 column 56
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "value" must be declared for element type "attribute".


------------------------------------------------------------------------
ERROR
 file = file:C:/xerces-1_3_1/data/personal.xsd line 7 column 65
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
The global element http://www.w3.org/2001/XMLSchema:person is not found,
but "pe
rson" appears in this reference without a namespace prefix, and items
without a
namespace prefix are assumed to be in the schema namespace because you
have xmln
s="http://www.w3.org/2001/XMLSchema".  However, "person" is defined right
here i
n this schema document.  You should declare a target namespace and define
a name
space prefix for it.



this error gets repeated for each definition. i wont waste the bandwidth
to report them all.


can i fix the sample so that it conforms to 2001? but if i do that then it
wont work with xerces 131, right?


is xerces 1.4 going to support 2001? or will it be deferred to a later
release?


tnx for any clarification you can provide! i know that i have a lot of
stuff in here.....


On Tue, 15 May 2001, Ian Roberts wrote:

> On Mon, 14 May 2001, John L. Utz III wrote:
>
> > is there somebody here who can tell me how all of this is supposed to
> > work?
> >
> > 1. Can i validate a schema?
>
> Yes.
>
> > 2. if so, how do i validate it? against what?
>
> http://alphaworks.ibm.com/tech/xmlsqc
>
> Ian
>
> --
> Ian Roberts, Software Engineer        DecisionSoft Ltd.
> Telephone: +44-1865-203192            http://www.decisionsoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: personal.xsd example won't validate

Posted by Ian Roberts <ir...@decisionsoft.com>.
On Mon, 14 May 2001, John L. Utz III wrote:

> is there somebody here who can tell me how all of this is supposed to
> work?
> 
> 1. Can i validate a schema?

Yes.

> 2. if so, how do i validate it? against what?

http://alphaworks.ibm.com/tech/xmlsqc

Ian

-- 
Ian Roberts, Software Engineer        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: personal.xsd example won't validate

Posted by "John L. Utz III" <ut...@singingfish.com>.
mr brown;

are you asking about validating XML *with* a schema ( as mr ashish alludes
to in his response )

or are you asking about validating the *schema*, which is what i think you
are asking about?

i thought that the beauty of schema is that you are supposed to be able to
validate them.

but when i make that statement, i see the glimmer of a halting problem
here :-)

so, if we *can* validate schema, what do we validate them against? another
schema? a dtd?

if it's against a schema, then do we need to know how to validate that
schema against another schema?

o heavens, my head hurts.

is there somebody here who can tell me how all of this is supposed to
work?

1. Can i validate a schema?

2. if so, how do i validate it? against what?

tnx!

johnu

On Mon, 14 May 2001, Ashish wrote:

> try using
> bash-2.03$ java dom/DOMCount -v -n -s
> ~/xerces-1_3_1/data/personal-schema.xml
>
>
> ----- Original Message -----
> From: "Curtis Brown" <cp...@iwant.com>
> To: <xe...@xml.apache.org>
> Sent: Monday, May 14, 2001 1:56 PM
> Subject: personal.xsd example won't validate
>
>
> > Using xerces 1.3.1, I try to run the DOMCount sample on the
> > personal.xsd file from the data subdir, but I get the following
> > errors:
> >
> > bash-2.03$ java dom/DOMCount -v -n -s ~/xerces-1_3_1/data/personal.xsd
> > [Error] personal.xsd:2:53: General Schema Error: Grammar with uri 2:
> http://www.w3.org/2000/10/XMLSchema , can not found.
> > [Error] personal.xsd:2:53: Element type "schema" must be declared.
> > [Error] personal.xsd:4:28: Element type "element" must be declared.
> > ...
> >
> > Has anyone been able to validate personal.xsd?  Does anyone have an
> > example of a schema that uses namespaces that also validates?
> >
> > Thanks,
> > Curtis Brown
> > cpbrown@iwant.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: personal.xsd example won't validate

Posted by Ashish <as...@ectone.com>.
try using
bash-2.03$ java dom/DOMCount -v -n -s
~/xerces-1_3_1/data/personal-schema.xml


----- Original Message -----
From: "Curtis Brown" <cp...@iwant.com>
To: <xe...@xml.apache.org>
Sent: Monday, May 14, 2001 1:56 PM
Subject: personal.xsd example won't validate


> Using xerces 1.3.1, I try to run the DOMCount sample on the
> personal.xsd file from the data subdir, but I get the following
> errors:
>
> bash-2.03$ java dom/DOMCount -v -n -s ~/xerces-1_3_1/data/personal.xsd
> [Error] personal.xsd:2:53: General Schema Error: Grammar with uri 2:
http://www.w3.org/2000/10/XMLSchema , can not found.
> [Error] personal.xsd:2:53: Element type "schema" must be declared.
> [Error] personal.xsd:4:28: Element type "element" must be declared.
> ...
>
> Has anyone been able to validate personal.xsd?  Does anyone have an
> example of a schema that uses namespaces that also validates?
>
> Thanks,
> Curtis Brown
> cpbrown@iwant.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org