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 Nikhil Dinesh <ni...@seas.upenn.edu> on 2004/06/08 03:23:36 UTC

InvalidDatatypeValueException -- Resource bundle

Hi,

I was trying to use the stuff in org.apache.xerces.impl.dv for
validating my data pre-serialization. The validation works fine but
the InvalidDatatypeValueException when I catch it and try to print the
stacktrace throw a further MissingResourceException. I have all the four
jars in my classpath. Perhaps I should be setting the required bundles,
but I cant find any docs.

I have another question about namespaces. I have an element with a
namespaced attribute - xlink:href with xmlns:xlink defined in my dtd.
When Im serializing a DOM it redeclares the namespace as
xmlns:NS1 and attribute NS1:href which seems fine to me. However when
I pipe this back in the DOMParser gives me an errors saying that the
xlink:href attribute is required but not presednt and the NS1:href
attribute
is not defined.  I checked this with dom.Counter. The java default
SAXParser also complains. Namespace features were turned on in both. So it
seems to me that either the serializer is in error or the parser is in
error. Im using the org.apache.xml.serialize.XML11Serializer .

Any suggestions would be much appreciated.
Thanks,
Nikhil






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


Re: InvalidDatatypeValueException -- Resource bundle

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
Hi,

Id sent this message a couple of days back . This is a retry for a
response in case someone who knew missed it. Would really appreciate an
answer.

Thanks,
Nikhil

On Mon, 7 Jun 2004, Nikhil Dinesh wrote:


>
> I was trying to use the stuff in org.apache.xerces.impl.dv for
> validating my data pre-serialization. The validation works fine but
> the InvalidDatatypeValueException when I catch it and try to print the
> stacktrace throw a further MissingResourceException. I have all the four
> jars in my classpath. Perhaps I should be setting the required bundles,
> but I cant find any docs.
>
> I have another question about namespaces. I have an element with a
> namespaced attribute - xlink:href with xmlns:xlink defined in my dtd.
> When Im serializing a DOM it redeclares the namespace as
> xmlns:NS1 and attribute NS1:href which seems fine to me. However when
> I pipe this back in the DOMParser gives me an errors saying that the
> xlink:href attribute is required but not presednt and the NS1:href
> attribute
> is not defined.  I checked this with dom.Counter. The java default
> SAXParser also complains. Namespace features were turned on in both. So it
> seems to me that either the serializer is in error or the parser is in
> error. Im using the org.apache.xml.serialize.XML11Serializer .
>
> Any suggestions would be much appreciated.
> Thanks,
> Nikhil
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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: DOM3 ErrorHandler

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
I was implementing org.apache.dom3.DOMErrorHandler instead of
org.w3c.dom.DOMErrorHandler.

Thanks a lot.
-Nikhil

On Tue, 13 Jul 2004, Michael Glavassevich wrote:

> Hello Nikhil,
>
> That should be fine. When built with the jars-dom3 target the
> DOMConfiguration is expecting an instance org.w3c.dom.DOMErrorHandler.
>
> Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:48:09 PM:
>
> > Hi Michael,
> >
> > I build from the CVS repository checked out about two days ago. Ive
> built
> > with the jars-dom3 target as the FAQ suggests. Is [1] that you suggest
> > different from this?
> >
> > Thanks,
> > Nikhil
> >
> > On Tue, 13 Jul 2004, Michael Glavassevich wrote:
> >
> > > Hi Nikhil,
> > >
> > > I'm guessing you tried this with the standard Xerces distribution. It
> > > contains some hacked imports which get replaced with the real DOM
> Level 3
> > > interfaces by the Ant script when Xerces is built with DOM Level 3
> > > support. It should work with the binaries [1] built with DOM Level 3
> > > support.
> > >
> > > Thanks.
> > >
> > > [1]
> > >
> http://www.apache.org/dist/xml/xerces-j/beta2-dom3-Xerces-J-bin.2.6.2.zip
> > >
> > > Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:00:00
> PM:
> > >
> > > > Hi,
> > > >
> > > > Im trying to set the DOM3 DOMErrorHandler through the
> DOMConfiguration
> > > > interface and I get a type mismatch error. Code looks like this:
> > > >
> > > > PSVIDocumentImpl psviDocument = new PSVIDocumentImpl();
> > > >
> > > > DOMConfiguration domConfig = psviDocument.getDomConfig();
> > > >
> > > > //myErrorHandler implements XMLErrorHandler(Xni), ErrorHandler(Sax),
> and
> > > > //                          DOMErrorHandler
> > > > domConfig.setParameter("error-handler", myErrorHandler);
> > > >
> > > > The error I get is:
> > > > org.w3.dom.DOMException: TYPE_MISMATCH_ERROR: The value for this
> > > parameter
> > > > name is incompatible with the expected value type
> > > >
> > > > Should I be implementing some other interface? The resource-resolver
> and
> > > > other parameters I set work fine.
> > > >
> > > > Thanks,
> > > > Nikhil
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> > > >
> > >
> > > Michael Glavassevich
> > > XML Parser Development
> > > IBM Toronto Lab
> > > E-mail: mrglavas@ca.ibm.com
> > > E-mail: mrglavas@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
> >
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@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: DOM3 ErrorHandler

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hello Nikhil,

That should be fine. When built with the jars-dom3 target the 
DOMConfiguration is expecting an instance org.w3c.dom.DOMErrorHandler.

Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:48:09 PM:

> Hi Michael,
> 
> I build from the CVS repository checked out about two days ago. Ive 
built
> with the jars-dom3 target as the FAQ suggests. Is [1] that you suggest
> different from this?
> 
> Thanks,
> Nikhil
> 
> On Tue, 13 Jul 2004, Michael Glavassevich wrote:
> 
> > Hi Nikhil,
> >
> > I'm guessing you tried this with the standard Xerces distribution. It
> > contains some hacked imports which get replaced with the real DOM 
Level 3
> > interfaces by the Ant script when Xerces is built with DOM Level 3
> > support. It should work with the binaries [1] built with DOM Level 3
> > support.
> >
> > Thanks.
> >
> > [1]
> > 
http://www.apache.org/dist/xml/xerces-j/beta2-dom3-Xerces-J-bin.2.6.2.zip
> >
> > Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:00:00 
PM:
> >
> > > Hi,
> > >
> > > Im trying to set the DOM3 DOMErrorHandler through the 
DOMConfiguration
> > > interface and I get a type mismatch error. Code looks like this:
> > >
> > > PSVIDocumentImpl psviDocument = new PSVIDocumentImpl();
> > >
> > > DOMConfiguration domConfig = psviDocument.getDomConfig();
> > >
> > > //myErrorHandler implements XMLErrorHandler(Xni), ErrorHandler(Sax), 
and
> > > //                          DOMErrorHandler
> > > domConfig.setParameter("error-handler", myErrorHandler);
> > >
> > > The error I get is:
> > > org.w3.dom.DOMException: TYPE_MISMATCH_ERROR: The value for this
> > parameter
> > > name is incompatible with the expected value type
> > >
> > > Should I be implementing some other interface? The resource-resolver 
and
> > > other parameters I set work fine.
> > >
> > > Thanks,
> > > Nikhil
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> > >
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@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
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: DOM3 ErrorHandler

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
Hi Michael,

I build from the CVS repository checked out about two days ago. Ive built
with the jars-dom3 target as the FAQ suggests. Is [1] that you suggest
different from this?

Thanks,
Nikhil

On Tue, 13 Jul 2004, Michael Glavassevich wrote:

> Hi Nikhil,
>
> I'm guessing you tried this with the standard Xerces distribution. It
> contains some hacked imports which get replaced with the real DOM Level 3
> interfaces by the Ant script when Xerces is built with DOM Level 3
> support. It should work with the binaries [1] built with DOM Level 3
> support.
>
> Thanks.
>
> [1]
> http://www.apache.org/dist/xml/xerces-j/beta2-dom3-Xerces-J-bin.2.6.2.zip
>
> Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:00:00 PM:
>
> > Hi,
> >
> > Im trying to set the DOM3 DOMErrorHandler through the DOMConfiguration
> > interface and I get a type mismatch error. Code looks like this:
> >
> > PSVIDocumentImpl psviDocument = new PSVIDocumentImpl();
> >
> > DOMConfiguration domConfig = psviDocument.getDomConfig();
> >
> > //myErrorHandler implements XMLErrorHandler(Xni), ErrorHandler(Sax), and
> > //                          DOMErrorHandler
> > domConfig.setParameter("error-handler", myErrorHandler);
> >
> > The error I get is:
> > org.w3.dom.DOMException: TYPE_MISMATCH_ERROR: The value for this
> parameter
> > name is incompatible with the expected value type
> >
> > Should I be implementing some other interface? The resource-resolver and
> > other parameters I set work fine.
> >
> > Thanks,
> > Nikhil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> >
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@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: DOM3 ErrorHandler

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Nikhil,

I'm guessing you tried this with the standard Xerces distribution. It 
contains some hacked imports which get replaced with the real DOM Level 3 
interfaces by the Ant script when Xerces is built with DOM Level 3 
support. It should work with the binaries [1] built with DOM Level 3 
support.

Thanks.

[1] 
http://www.apache.org/dist/xml/xerces-j/beta2-dom3-Xerces-J-bin.2.6.2.zip

Nikhil Dinesh <ni...@seas.upenn.edu> wrote on 07/13/2004 02:00:00 PM:

> Hi,
> 
> Im trying to set the DOM3 DOMErrorHandler through the DOMConfiguration
> interface and I get a type mismatch error. Code looks like this:
> 
> PSVIDocumentImpl psviDocument = new PSVIDocumentImpl();
> 
> DOMConfiguration domConfig = psviDocument.getDomConfig();
> 
> //myErrorHandler implements XMLErrorHandler(Xni), ErrorHandler(Sax), and
> //                          DOMErrorHandler
> domConfig.setParameter("error-handler", myErrorHandler);
> 
> The error I get is:
> org.w3.dom.DOMException: TYPE_MISMATCH_ERROR: The value for this 
parameter
> name is incompatible with the expected value type
> 
> Should I be implementing some other interface? The resource-resolver and
> other parameters I set work fine.
> 
> Thanks,
> Nikhil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

DOM3 ErrorHandler

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
Hi,

Im trying to set the DOM3 DOMErrorHandler through the DOMConfiguration
interface and I get a type mismatch error. Code looks like this:

PSVIDocumentImpl psviDocument = new PSVIDocumentImpl();

DOMConfiguration domConfig = psviDocument.getDomConfig();

//myErrorHandler implements XMLErrorHandler(Xni), ErrorHandler(Sax), and
//                          DOMErrorHandler
domConfig.setParameter("error-handler", myErrorHandler);

The error I get is:
org.w3.dom.DOMException: TYPE_MISMATCH_ERROR: The value for this parameter
name is incompatible with the expected value type

Should I be implementing some other interface? The resource-resolver and
other parameters I set work fine.

Thanks,
Nikhil





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