R: R: R: [DIG-users] TellsDocument
Brought to you by:
dturi
From: Luigi I. <ia...@di...> - 2004-11-19 17:16:26
|
Hi again, I have the following strange situation now. If I run the following code public class TestBean { public static void main(String[] args) { try { TellsDocument tells =3D TellsDocument.Factory.parse(new File("dummyTell.txt")); =09 System.out.println(tells.getTells().getEqualcArray().length); Document doc =3D DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File("dummyTell.txt")); TellsDocument newTells =3D TellsDocument.Factory.parse(doc); =09 System.out.println(newTells.getTells().getEqualcArray().length); } catch (XmlException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (FactoryConfigurationError e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } I obtain the following output for the file attached (dummyTell.txt) 17 org.apache.xmlbeans.XmlException: error: The document is not a tells@http://dl.kr.org/dig/2003/02/lang: document element namespace = mismatch expected "http://dl.kr.org/dig/2003/02/lang" got "" at org.apache.xmlbeans.impl.store.Root.verifyDocumentType(Root.java:501) at org.apache.xmlbeans.impl.store.Root.autoTypedDocument(Root.java:417) at org.apache.xmlbeans.impl.store.Root.loadXml(Root.java:1817) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoad= erB ase.java:342) at org.kr.dl.dig.v1_1.TellsDocument$Factory.parse(TellsDocument.java:126) at TestBean.main(TestBean.java:32) In practice when I parse from file everything goes right (or seems) as = it prints out the number of equalsc. When I parse from Document it raises = an exception. Can you help me? Thanks, Luigi -----Messaggio originale----- Da: dig...@li... [mailto:dig...@li...] Per conto di Daniele Turi Inviato: venerd=EC 19 novembre 2004 13.51 A: Luigi Iannone Cc: dig...@li... Oggetto: Re: R: R: [DIG-users] TellsDocument Luigi Iannone wrote: >Hi again, > >do you know how to get the number of the cardinality restriction in an >instance of NumRoleConceptPair as it is not clear either in the Javadoc = or >the xsd schema file > =20 > The interface NumRoleConceptPair has a getNum() method which should do the job. Daniele --=20 Dr Daniele Turi Information Management Group, School of Computer Science The University of Manchester 2.100 Kilburn Building, Oxford Road, Manchester, M13 9PL, UK. Tel +44 (0) 161 275 6145 Fax 6211 http://www.cs.man.ac.uk/~dturi ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ DIG-users mailing list DIG...@li... https://lists.sourceforge.net/lists/listinfo/dig-users |