Re: [dom4j-dev] error validating my document

2008-07-07 Thread Patrizio.Ferlito
Hi Filip, I've found the solution at http://www.edankert.com/validate.html#Validate_using_external_Schema_s. Here the code: SAXParserFactory factory = SAXParserFactory.newInstance(); SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema";);

Re: [dom4j-dev] error validating my document

2008-07-07 Thread Patrizio.Ferlito
Thanks Filip, but I get the same error: SAXReader reader = new SAXReader(true); reader.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation";, args[1]); ... Document is invalid: no grammar found. Document root element "event-bus:runtime", must match DOCTYPE r

[dom4j-dev] error validating my document

2008-07-07 Thread Patrizio.Ferlito
Hi all, I've the below very simple document http://www.bsource.ch/EventBus "> undefined and the related xml schema: http://www.w3.org/2001/XMLSchema " targetNamespace="http://www.bsource.ch/EventBus

[dom4j-dev] About namespaces

2008-07-04 Thread Patrizio.Ferlito
Hi all, I'm trying to understand better the namespace topic. If I've a document like below: [DOC1] http://something";> 2007 2008 if I want access book elements with xpath expression I should use /myns:books/book and not /myns:books/myns:book (I've used XMLSpy). So I deduce that