[Sax-devel] Wrong Exception text on parsing error ?
Brought to you by:
dmegginson
From: <dav...@he...> - 2006-11-06 14:51:02
|
Hi! I encountered the (small) problem described below. I use Sun Java "1.5.0_09" on Windows XP. Is this a SAX problem ? Regards, David -------- Original Message -------- Subject: Strange XML editor error Date: Mon, 06 Nov 2006 15:43:19 +0100 From: David Bala=C5=BEic <dav...@he...o> Organization: HSL To: sax...@li... Newsgroups: eclipse.platform Hi! I encountered this weird error report when editing an XML file in=20 Eclipse 3.2.1 : Wrong line in XML file : <many-to-many class=3D"Naslov" cascade=3D"save-update"/> reported error by Eclipse : Attribute "cascade" must be declared for element type "many-to-many". In reality it should say "must NOT be declared...", because the=20 many-to-many tag has not attribute "cascade". I get the same error from another tool working on the same XML file : [hibernatetool] org.xml.sax.SAXParseException: Attribute "cascade" must=20 be declared for element type "many-to-many". So maybe this is a bug in the SAX XML parser ? The entire XML file is quoted below. Regards, David PS: The XML file contents : <?xml version=3D"1.0" encoding=3D"UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package=3D"com.manning.hq.stein.data"> <class name=3D"Oseba"> <id name=3D"id"> <generator class=3D"native" /> </id> <property name=3D"ime" /> <property name=3D"priimek" /> <property name=3D"spol" /> <!-- many-to-one name=3D"naslov" class=3D"Naslov" cascade=3D"save-updat= e" /--> <!-- test types of cascading --> <!-- column=3D"naslov_id" cascade=3D"none" --> <set name=3D"naslovi" cascade=3D"save-update"> <key /> <many-to-many class=3D"Naslov" cascade=3D"save-update"/> </set> <joined-subclass name=3D"OdraslaOseba"> <key /> <property name=3D"poklic" /><!-- <property name=3D"pla=C4=8Da" column=3D"placa" /> =09 <many-to-one name=3D"najbolj=C5=A1iPrijatelj" column=3D"frend" class=3D"Oseba" />--> </joined-subclass> <joined-subclass name=3D"Otrok"> <key /><!-- <property name=3D"najljub=C5=A1aRisanka" column=3D"najrisanka" /> --> <property name=3D"vzdevek" /> </joined-subclass> </class> <query name=3D"byIme">from Oseba where ime =3D :ime</query> <query name=3D"byName"> <![CDATA[from Oseba where name =3D :ime]]> </query> <query name=3D"byPriimek"> <![CDATA[from Oseba where priimek =3D :ime]]> </query> <query name=3D"byPpriimek"> <![CDATA[from Oseba where ppriimek =3D :ime]]> </query> </hibernate-mapping> |