From: SourceForge.net <no...@so...> - 2009-04-23 16:47:39
|
Bugs item #2779680, was opened at 2009-04-23 11:47 Message generated for change (Tracker Item Submitted) made by david-o-evans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2779680&group_id=17691 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: David Evans (david-o-evans) Assigned to: Nobody/Anonymous (nobody) Summary: issues with amperstand '&' in xml content Initial Comment: eXist v 1.2.5 ISSUE #1 I've been loading some XML data using the setup:create-collection and setup:store-files functions from the admin/setup.xqm module provided with eXist 1.2.5. I've been able to identify the following section in my XML file that causes the problem. If I remove the '&', the file loads fine. <Concept agencyID="OECD" id="KINDPATENT"> <Name xml:lang="en">Patent office & Triadic Patent Families</Name> <Name xml:lang="fr">Office de Brevets & Familles de Brevets Triadique</Name> </Concept> xmldb.log records the following error: 2009-04-23 12:13:22,578 [P1-9] DEBUG (LocalCollection.java [storeResource]:647) - storing document oecd.concepts.xml 2009-04-23 12:13:22,578 [P1-9] ERROR (LocalCollection.java [storeXMLResource]:755) - org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference. exist.log provides more of a stacktrace with sample shown here... 2009-04-23 12:13:22,906 [P1-9] DEBUG (Collection.java [validateXMLResourceInternal]:1186) - Scanning document /db/sdmxapi/org/oecd/dsd/codelists/oecd.codelists.s-z.xml 2009-04-23 12:13:22,921 [P1-9] DEBUG (Indexer.java [fatalError]:388) - fatal error at (382,56) : The entity name must immediately follow the '&' in the entity reference. 2009-04-23 12:13:22,921 [P1-9] WARN (XMLDBLoadFromPattern.java [evalWithCollection]:181) - Could not store file C:\app-server\sdmxapi-eXist\sdmxapi\org\oecd\dsd\codelists\oecd.codelists.s-z.xml: The XML parser reported a problem: fatal error at (382,56) : The entity name must immediately follow the '&' in the entity reference. org.xmldb.api.base.XMLDBException: The XML parser reported a problem: fatal error at (382,56) : The entity name must immediately follow the '&' in the entity reference. at org.exist.xmldb.LocalCollection.storeXMLResource(LocalCollection.java:756) at org.exist.xmldb.LocalCollection.storeResource(LocalCollection.java:650) at org.exist.xmldb.LocalCollection.storeResource(LocalCollection.java:641) at org.exist.xquery.functions.xmldb.XMLDBLoadFromPattern.evalWithCollection(XMLDBLoadFromPattern.java:177) at org.exist.xquery.functions.xmldb.XMLDBAbstractCollectionManipulator.eval(XMLDBAbstractCollectionManipulator.java:147) at org.exist.xquery.BasicFunction.eval(BasicFunction.java:68) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:49) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:59) at org.exist.xquery.PathExpr.eval(PathExpr.java:238) at org.exist.xquery.LetExpr.eval(LetExpr.java:150) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:144) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:59) at org.exist.xquery.PathExpr.eval(PathExpr.java:238) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:128) at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:62) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:246) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:180) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:59) ISSUE #2 When I started searching for other references to this problem, I noticed the following '&' error on the eXist site. 1. Go to http://exist-db.org website. 2. Enter an amperstand character '&' in the search box and click search. You'll see the following error: Error while evaluating expression: collection('/db/xqdocs')/book//section/title[. &= '&'] | collection('/db/xqdocs')/book//para[. &= '&']. expecting ''', found '&' [at line 125, column 38] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2779680&group_id=17691 |