You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elena Patra <ep...@imediation.com> on 2001/06/05 18:41:41 UTC

xerces-j1.4.0 with standard XML Schema

Hi, 
I'm using xerces-J 1.4.0 for validating an XML document against two XML
Schemas (recommendation http://www.w3.org/2001/XMLSchema) .
I do not want to use URLs, but instead schemaLocation attributes to resolve
namespaces, so my XML Schema includes:
<xsd:import namespace="my-data" schemaLocation="data.xsd"/>
and later on:
<xsd:any namespace = "my-data" processContents = "strict" minOccurs = "0"
maxOccurs = "unbounded"/>
The error I am getting is :
[Error] mytest.xml:6:28: Schema error: Invalid attribute value 'my-data' for
'namespace' in type 'any'.

The same XML Schemas/instances conforming to the draft version
(http://www.w3.org/2000/10/XMLSchema) are
being validated succesfully. 

Any suggestions are wellcome.
thanks in advance,
Elena

	

Re: starting with xml4j

Posted by Elena Litani <el...@ca.ibm.com>.
> I have followed the instructions and have set the
> classpath appropriately, but I've set xerces.jar
> instead of xml4j.jar. 
If you using xml4j you need both xerces.jar and xml4j.jar in your
classpath!
> I've tried it just now and still
> get the same error! (NoClassDefFoundError).
If you still have the problem can you give a name of the class? 
I mean the full message...

> Do you suggest to get the latest release of xerces?
The problem you are having is nothing to do with the parser. You should
decide which one you use depending on your needs. 
And you don't need Cygwin to use Xerces/XML4J. 

Elena

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


Re: starting with xml4j

Posted by mirto dimoudi <mi...@yahoo.com>.
> > I have just downloaded xml4j, vr 3.1.1 from ibm
> and
> > I'm trying to write my own program. I keep getting
> a
> > NoClassDefFoundError when running, even though it
> > compiles successfully.
> Check your classpath. Make sure your classpath is
> set so that you have
> xml4j.jar before anything
> else.

I have followed the instructions and have set the
classpath appropriately, but I've set xerces.jar
instead of xml4j.jar. I've tried it just now and still
get the same error! (NoClassDefFoundError). 
Do you suggest to get the latest release of xerces?
Also, do I need Cygwin? That's the advice I've got,
but I can't seem to get it to work! that's in order to
be able to recompile the sample files, and work on
them! 

Thanks for your time! I'll check the user link!
Mirto 

> Please note, XML4J 3.1.1 is different from the
> latest Xerces release.
> Thus, it might be appropriate to ask questions
> related to XML4J on
> alphaworks forum. As for Xerces we have special
> *user* mailing list for
> such questions: xerces-j-user@xml.apache.org.
> 
> Good Luck,
> Elena.


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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


Re: starting with xml4j

Posted by Elena Litani <el...@ca.ibm.com>.
Hi, Mirto,

> I have just downloaded xml4j, vr 3.1.1 from ibm and
> I'm trying to write my own program. I keep getting a
> NoClassDefFoundError when running, even though it
> compiles successfully.
Check your classpath. Make sure your classpath is set so that you have
xml4j.jar before anything
else.
Please note, XML4J 3.1.1 is different from the latest Xerces release.
Thus, it might be appropriate to ask questions related to XML4J on
alphaworks forum. As for Xerces we have special *user* mailing list for
such questions: xerces-j-user@xml.apache.org.

Good Luck,
Elena.

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


starting with xml4j

Posted by mirto dimoudi <mi...@yahoo.com>.
Good day!

I have just downloaded xml4j, vr 3.1.1 from ibm and
I'm trying to write my own program. I keep getting a
NoClassDefFoundError when running, even though it
compiles successfully. 
Also, When I'm changing the sample files and recompile
them, create new .class files, I keep getting the
exact output.! 
Is there any other software I need to get? I've tried
Cygwin that is recommended from Apache, but It doesn't
make a difference!
The fact that the files are packaged, could it be
causing me trouble?

I basically want some instructions on how to get
started with writing my own programs!

Thank you all very much for any feedback!
Mirto





__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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


Re: xerces-j1.4.0 with standard XML Schema

Posted by Elena Litani <el...@ca.ibm.com>.
> <xsd:import namespace="my-data" schemaLocation="data.xsd"/>
> and later on:
> <xsd:any namespace = "my-data" processContents = "strict" minOccurs =
> "0" maxOccurs = "unbounded"/>
> The error I am getting is :
> [Error] mytest.xml:6:28: Schema error: Invalid attribute value
> 'my-data' for 'namespace' in type 'any'.
I believe the full message you should be getting is:
"[Error] name_of_file: Schema error: Invalid attribute value 'my-data'
for 'namespace' in 'any': Value 'my-data' is a Malformed URI". 
Xerces web page has a page about schema support in Xerces. 
It states that we don't handle correctly relative URIs ("my-data").

I am planning to fix this bug in the next few days (maybe even today).
BTW, attaching sample files that cause the problem is always a good
idea.

Thanks,
Elena.

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