Alberto Gonz?lez T?llez wrote: > > I have tried to open an IMS Content Package file > with XXE but some errors appear before loading > the file: > > <errors> > :E::: declaraci?n duplicada de la definci?n del grupo de atributos > "xml:specialAttrs" [sch-props-correct.2] > > :E::: declaraci?n duplicada del atributo "xml:base" [sch-props-correct.2] > > :E::: declaraci?n duplicada del atributo "xml:lang" [sch-props-correct.2] > > :E::: declaraci?n duplicada del atributo "xml:space" [sch-props-correct.2] > </errors> > > When opening it with <Oxygen> the document appears > as valid. > > Please, find attached a zip file containing the xml > file (imsmanifest.xml) and the schemas.
* imsmanifest.xml is validated against imscp_v1p1.xsd + imsmd_v1p2p4.xsd * imscp_v1p1.xsd contains: <xsd:import namespace = "http://www.w3.org/XML/1998/namespace" schemaLocation = "http://www.w3.org/2001/xml.xsd"/> * imsmd_v1p2p4.xsd contains: <xsd:import namespace = "http://www.w3.org/XML/1998/namespace" schemaLocation = "http://www.w3.org/2001/03/xml.xsd"/> No matter what may think <Oxygen> (which uses a validator different from XMLmind's), this is obviously inconsistent! --> Consequences: [1] Unless you use an XML catalog, xml.xsd is downloaded twice from the web site of the W3C which causes the validation to take forever. [2] The above errors are (correctly) reported. --> Fix: * Use an XML catalog which maps both http://www.w3.org/2001/xml.xsd and http://www.w3.org/2001/03/xml.xsd to the *same* local copy of xml.xsd (copy XMLSchema.dtd along xml.xsd because xml.xsd starts with totally useless and pretty inefficient: <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd">) * OR replace http://www.w3.org/2001/xml.xsd and http://www.w3.org/2001/03/xml.xsd by xml.xsd (and remove <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd"> from it) I did that: no slowness, no errors. imsmanifest.xml, but also imscp_v1p1.xsd and imsmd_v1p2p4.xsd, all validate fine.

