|
RE: [XmlBeans V2] [BUG ?] Unexpected element: CDATA: msg#00139text.xml.xmlbeans.user
I'm not able to repro the CDATA issue you are seeing. You may want to update your xsi namespace definition in your instance. It appears as though you are using 2 different xml schema versions (2000 and 2001). xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" instead of xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" It probably won't help with the CDATA, but it will remove the errors seen when validating the instance. -Jacobd -----Original Message----- From: Stéphane Rault [mailto:ksbrault@xxxxxxxx] Sent: Tuesday, January 25, 2005 7:06 AM To: user@xxxxxxxxxxxxxxxxxxx Subject: [XmlBeans V2] [BUG ?] Unexpected element: CDATA Hello developers ! My first bug have forced me to switch to xmlbeans V2 but I'm afraid I've a problem again. When i parse my file with xmlbeans (10/01/2005) I catch this exception : org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA at org.apache.xmlbeans.impl.newstore2.Locale$SaxLoader.load(Locale.java:2783) at org.apache.xmlbeans.impl.newstore2.Locale.parse(Locale.java:626) at org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:611) at org.apache.xmlbeans.impl.newstore2.Locale.parseToXmlObject(Locale.java:605) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:201) at fr.cedi.eai.configuration.beans.counter.CountersDocument$Factory.parse(Unknown Source) at fr.cedi.eai.configuration.ApplicationParameters.getNextCounterValue(ApplicationParameters.java:204) at test.CounterTest.main(CounterTest.java:26) Caused by: org.xml.sax.SAXParseException: Unexpected element: CDATA at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1000) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:987) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyerror(Piccolo.java:1301) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:699) to my mind, my file is OK with its schema. Here is my schema : <?xml version="1.0" encoding="ISO-8859-1"?> <xsd:schema targetNamespace="http://dufourrault/counter" xmlns="http://dufourrault/counter" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="counters"> <xsd:complexType> <xsd:sequence> <xsd:element name="counter" type="descCounter" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="descCounter"> <xsd:sequence> <xsd:element name="mnemonic" type="xsd:string" /> <xsd:element name="increment" type="xsd:integer" /> <xsd:element name="lastValueUsed" type="xsd:long" /> </xsd:sequence> </xsd:complexType> </xsd:schema> and here is my test File <?xml version="1.0" encoding="ISO-8859-1"?> <counters xmlns="http://dufourrault/counter" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://dufourrault/counter c:\temp\schemaCounter.xsd"> <counter> <mnemonic>stefMnemo</mnemonic> <increment>1</increment> <lastValueUsed>12</lastValueUsed> </counter> </counters> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [XmlBeans V2] [BUG ?] Unexpected element: CDATA: 00139, Stéphane Rault |
|---|---|
| Next by Date: | RE: default values for created beans: 00139, Radu Preotiuc-Pietro |
| Previous by Thread: | Re: [XmlBeans V2] [BUG ?] Unexpected element: CDATAi: 00139, Stéphane Rault |
| Next by Thread: | Re: [XmlBeans V2] [BUG ?] Unexpected element: CDATA: 00139, Stéphane Rault |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |