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 Arnaud Le Hors <le...@us.ibm.com> on 2001/01/20 01:58:03 UTC

Re: Patch to fix shadowing of NodeList DOM methods

All right, this patch has now been checked in!
I reviewed the changes and I must admit that this really looks like the
best compromise.
Thanks Mark for your contribution!
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

Re: Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
Unfortunately I can't find the original zip.  I did not get the code from CVS.
Most of the files appear to be dated 11/28/2000 ~ 12am (I'm in PST) if that helps
any.

I'm pretty busy this week, I could try it out next week.  My guess is that I'm
somehow curcumventing whatever reads the properties file.

Kevin


Edwin Goei wrote:

> Kevin Steppe wrote:
> >
> > Thanks.  What should I be doing to ensure that the properties file gets read
> > properly?
>
> First of all, where are you getting crimson from?  The latest code
> should not have this problem.  The latest code is available from CVS in
> the /xml-crimson repository (not the one under /xml-contrib).
>
> I also just quickly created a crimson-1.1ea2.zip file and put it at
> http://xml.apache.org/dist/crimson/ for anyone to download until some
> misc issues get sorted out.  I'm in the middle of getting a release out
> at work so I'll work on cleaning things up later.
>
> Could you test it with the binary version and if it still does not work
> send me a simple test program?
>
> -Edwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Error from Crimson

Posted by Edwin Goei <Ed...@eng.sun.com>.
Kevin Steppe wrote:
> 
> At the time I wrote the code I wanted to have an special element factory for some
> special syntax and so I needed to explicitly create an XmlDocument.  I've created static
> method versions so I could probably forgo the subclassed Elements now.
> 
> What's the latest crimson.jar?

The latest version is what you get when building from the CVS
repository.  But something that is pretty close to that which is
pre-built, you can get from:

http://xml.apache.org/dist/crimson/

-Edwin

Re: Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
At the time I wrote the code I wanted to have an special element factory for some
special syntax and so I needed to explicitly create an XmlDocument.  I've created static
method versions so I could probably forgo the subclassed Elements now.

What's the latest crimson.jar?


Edwin Goei wrote:

> Kevin Steppe wrote:
> >
> > Edwin,
> >
> > I know this is a bit slow in coming but -- I noticed that in the section where the
> > properties file isn't read I used new XMLDocument(...) directly.  Later I use
> > DocumentBuilderFactory and errors at that point read from the properties file.
> > Without having looked into the code, I'm guessing the properties are read in the
> > factory somewhere.  This is why I don't like using a properties file for error
> > messages.
>
> Did you download the latest crimson.jar from the website and tried your
> program with it?  See http://xml.apache.org/dist/crimson/.
>
> To create a new DOM Document object, I would recommend doing something
> like this:
>
> DOMImplementation domImplementation =
> DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplementation();
>
> Then once to have a DOM Level 2 DOMImplementation instance, you can
> create a DocumentType node and create a Document.
>
> -Edwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Error from Crimson

Posted by Edwin Goei <Ed...@eng.sun.com>.
Kevin Steppe wrote:
> 
> Edwin,
> 
> I know this is a bit slow in coming but -- I noticed that in the section where the
> properties file isn't read I used new XMLDocument(...) directly.  Later I use
> DocumentBuilderFactory and errors at that point read from the properties file.
> Without having looked into the code, I'm guessing the properties are read in the
> factory somewhere.  This is why I don't like using a properties file for error
> messages.

Did you download the latest crimson.jar from the website and tried your
program with it?  See http://xml.apache.org/dist/crimson/.

To create a new DOM Document object, I would recommend doing something
like this:

DOMImplementation domImplementation =
DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplementation();

Then once to have a DOM Level 2 DOMImplementation instance, you can
create a DocumentType node and create a Document.

-Edwin

Re: Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
Edwin,

I know this is a bit slow in coming but -- I noticed that in the section where the
properties file isn't read I used new XMLDocument(...) directly.  Later I use
DocumentBuilderFactory and errors at that point read from the properties file.
Without having looked into the code, I'm guessing the properties are read in the
factory somewhere.  This is why I don't like using a properties file for error
messages.

Kevin


Edwin Goei wrote:

> Kevin Steppe wrote:
> >
> > Thanks.  What should I be doing to ensure that the properties file gets read
> > properly?
>
> First of all, where are you getting crimson from?  The latest code
> should not have this problem.  The latest code is available from CVS in
> the /xml-crimson repository (not the one under /xml-contrib).
>
> I also just quickly created a crimson-1.1ea2.zip file and put it at
> http://xml.apache.org/dist/crimson/ for anyone to download until some
> misc issues get sorted out.  I'm in the middle of getting a release out
> at work so I'll work on cleaning things up later.
>
> Could you test it with the binary version and if it still does not work
> send me a simple test program?
>
> -Edwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Error from Crimson

Posted by Edwin Goei <Ed...@eng.sun.com>.
Kevin Steppe wrote:
> 
> Thanks.  What should I be doing to ensure that the properties file gets read
> properly?

First of all, where are you getting crimson from?  The latest code
should not have this problem.  The latest code is available from CVS in
the /xml-crimson repository (not the one under /xml-contrib).

I also just quickly created a crimson-1.1ea2.zip file and put it at
http://xml.apache.org/dist/crimson/ for anyone to download until some
misc issues get sorted out.  I'm in the middle of getting a release out
at work so I'll work on cleaning things up later.

Could you test it with the binary version and if it still does not work
send me a simple test program?

-Edwin

how to handle xml:lang attribute in XML

Posted by Ashish <as...@ectone.com>.
Hi all,

I have a question regarding xml:lang attribute.

I am trying to parse and validate an xml document that contains the
attribute xml:lang

the error I get is as follows:
**************************************
sample_xml.xml:
[Error] sample_xml.xml:7:32: Attribute "xml:lang" must be declared for
element type "FreeFormText".
<?xml version="1.0" encoding="UTF-8"?>
<DOCROOT xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="sample_xsd.xsd">

<Element1>First Element</Element1>
<FreeFormText xml:lang="en-US">Some Text</FreeFormText>
</DOCROOT>
***************************************

I am using DOMWriter that came with xerces1.2.1 and I have -n and -v flags
enabled.

Thanks
--Ashish




Re: Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
Thanks.  What should I be doing to ensure that the properties file gets read
properly?

Kevin


Edwin Goei wrote:

> Kevin Steppe wrote:
> >
> > No help.  It appears that I corrupted the file somehow and the opening "<?xml
> > " was no longer there, and I'm guessing that's what P-067 refers too.
> >
> > Since Crimson is not the code base for ongoing development I won't harp on
> > this much, but "Error codes really need to be documented!"
>
> Hmmm, you shouldn't see the error codes at all.  See
> org/apache/crimson/parser/resources/*.properties.
>
> -Edwin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Error from Crimson

Posted by Edwin Goei <Ed...@eng.sun.com>.
Kevin Steppe wrote:
> 
> No help.  It appears that I corrupted the file somehow and the opening "<?xml
> " was no longer there, and I'm guessing that's what P-067 refers too.
> 
> Since Crimson is not the code base for ongoing development I won't harp on
> this much, but "Error codes really need to be documented!"

Hmmm, you shouldn't see the error codes at all.  See
org/apache/crimson/parser/resources/*.properties.

-Edwin

Re: Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
No help.  It appears that I corrupted the file somehow and the opening "<?xml
" was no longer there, and I'm guessing that's what P-067 refers too.

Since Crimson is not the code base for ongoing development I won't harp on
this much, but "Error codes really need to be documented!"

Thanks for looking,
Kevin

jean-frederic clere wrote:

> Kevin Steppe wrote:
> >
> > I'm trying out Crimson.  I'm trying to re-parse an XML file written by a
> > XMLDocument using the SAX parser.  I'm getting a SAX exception
> > "org.apache.crimson.parser/P-067".  Anyone know what this means?
> >
> > Kevin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
> I have found this:
>         VC_NO_DUPLICATE_TYPES = 67,         // 3.2.2 [51] The same type
> must not appear more than once in a mixed content declaration
>
> Does it helps?
>
> Cheers
>
> Jean-frederic Clere
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Error from Crimson

Posted by jean-frederic clere <jf...@fujitsu.siemens.es>.
Kevin Steppe wrote:
> 
> I'm trying out Crimson.  I'm trying to re-parse an XML file written by a
> XMLDocument using the SAX parser.  I'm getting a SAX exception
> "org.apache.crimson.parser/P-067".  Anyone know what this means?
> 
> Kevin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

I have found this:
        VC_NO_DUPLICATE_TYPES = 67,         // 3.2.2 [51] The same type
must not appear more than once in a mixed content declaration


Does it helps?

Cheers

Jean-frederic Clere

Re: Error from Crimson

Posted by Edwin Goei <Ed...@eng.sun.com>.
Kevin Steppe wrote:
> 
> I'm trying out Crimson.  I'm trying to re-parse an XML file written by a
> XMLDocument using the SAX parser.  I'm getting a SAX exception
> "org.apache.crimson.parser/P-067".  Anyone know what this means?

OK, I just looked into this problem.  You should only get an error code
if you are running in a Locale that is not English, ie. "en".  So the
easiest way to fix it would be to make sure your locale is English.

I've renamed the resource files so that now you will get English
messages regardless of the locale you are in, instead of getting an
error code.  To get this fix, requires building from CVS, until a new
zip file is created.

-Edwin

Error from Crimson

Posted by Kevin Steppe <ks...@pacbell.net>.
I'm trying out Crimson.  I'm trying to re-parse an XML file written by a
XMLDocument using the SAX parser.  I'm getting a SAX exception
"org.apache.crimson.parser/P-067".  Anyone know what this means?

Kevin