In UTF-8, characters over 0x7F are encoded as multi-byte sequences. Your
0xD2 character (binary 11010010) should be encoded as the two bytes
1111 10010010, or 0xC3 0x92.
See http://www.faqs.org/rfcs/rfc2279.html for the exact details.
As to why an ancient version of Xerces accepted it: It
I have a XML document has an international character in it, see below (hex
value is 0xD2), if I use the "US-ASCII" processing instruction (, then I can view the document from the IE
without any problems, but if I change to "UTF-8" (), then the IE reports an "invalid character was found"
error.
[EMAIL PROTECTED] writes:
> Try this:
>
> factory.setNamespaceAware(true);
> factory.setValidating(true);
> factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage";,
> "http://www.w3.org/2001/XMLSchema";);
>
> Note that you need all the 4 things to ge
Try this:
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
factory.setAttribute
("http://java.sun.com/xml/jaxp/properties/schemaLanguage";,
Not sure whether this would solve your problem, but I would strongly
recommend that you upgrade to the latest Xerces (2.2.1), which comes with
the latest serializer code. Thx to Elena, lots of bugs were fixed there,
and, IIRC, many are related to namespaces.
Cheers,
Sandy Gao
Software Developer, I
See the DOM Level 3 Working Draft's discussion of "namespace
normalization" for a recommended way of handling this. As far as I know
that algorithm is still evolving, and I don't know how much of it the
Xerces serializers impelement.
__
Joe Kesselman / IBM R
The reason that the entity resolver is not called is that in the case there
is no xsi:schemaLocaiton in the instance, both system id and public id
would be null, then most applications wouldn't know what to do with them.
This is why the parser decides not to call the entity resolver.
2 ways to sol
Hi,
Thanks for your response. I could get some information from your reply.
But I need few clarification. I have to validate the attched XML against the
attached XSD. The XML file come to the validator through some other
application. The incoming XML look like the attached one. It does not have
Hi,
trying to create an XML document using Xerces' 1.4.2 XMLSerializer,
I guess it should possible to automatically generate the needed
xml namespace prefixes for the generated element names, i.e. to use
doc.createElementNS (, "");
instead of adding the prefix manually every time like
doc.cr
This did the trick. I really make thorough use of these packages. Well
done. I'll look into the patch submitting process.
Thanks,
Dean
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 10:30 AM
To: [EMAIL PROTECTED]
Subject: Re: org.
Hi Neil,
thank you for your qick answer!!
Yeah, just included the feature and it works:
factory.setAttribute ("http://xml.org/sax/features/validation";,
new Boolean(true));
All my troubles are gone. :-)
I have already switched to SAX parsing, my email contained j
Yes. getConstraintType() returns which kind of value constraint is defined:
XSConstants.VC_NONE/DEFAULT/FIXED. getConstraintValue() returns the string
representation of the default/fixed value.
I agree that the javadoc should be more descriptive. Any suggestion
(patches preferred :-) ) welcome!
C
Hi Markus,
Seems you haven't set the http://xml.org/sax/features/validation feature
anywhere; this needs to be set for Xerces to report errors. The JAXP
setValidating(boolean) methods have the same purpose.
Another question I have is: if you only care about speed, why not use SAX?
Most of your
Hi,
I'm working with xerces 2.2.1. I try to validate an XML document with an
Key-Keyref XML Schema but my Java code (and xerces parser) does not find
the errors in my XML document. Element hr/depts/dept/DEPTNO contains the
key and hr/emps/emp/DEPTNO contains the keyref.
My question is: How do I h
Well, yes that looks quit nice. Thank you so far.
greetings
Heiner
-Ursprüngliche Nachricht-
Von: Dennis Sosnoski [mailto:[EMAIL PROTECTED]
Gesendet am: Mittwoch, 20. November 2002 20:40
An: [EMAIL PROTECTED]
Betreff: Re: Beginners question continued
I agree with Chris that Castor's prob
15 matches
Mail list logo