parse-xml-fragment triggers schema error

Bug #1008504 reported by Alexander Kreutz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Nicolae Brinza

Bug Description

When running the attached example a schema validation error inside the xml module is thrown:

/home/tryzorba/repo/zorba-2.2.0/build/URI_PATH/com/zorba-xquery/www/modules/xml.xq>:346,5: dynamic error [err:XQDY0027]: "Schema validation failed: no declaration found for element 'parse-xml-options:strip-boundary-space'": unexpected validity property

-----------------------------------------------------------------------------Example:
xquery version "3.0";

import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";

parse-xml:parse-xml-fragment("<xml>test</xml>","EDSlwf")

Related branches

David Graf (davidagraf)
Changed in zorba:
assignee: nobody → David Graf (davidagraf)
David Graf (davidagraf)
Changed in zorba:
assignee: David Graf (davidagraf) → Nicolae Brinza (nbrinza)
importance: Undecided → Medium
Revision history for this message
Chris Hillery (ceejatec) wrote :

Pretty straightforward bug here: the deprecated backwards-compatible version of parse-xml-fragment() converts the arguments string ("EDSlwf" in the above example) into an <parse-xml-options:options> element. The "w" flag introduces a <parse-xml-options:strip-boundary-space/> element into that <options>. But there's no strip-boundary-space element defined by the schema. There doesn't seem to be anything at all related to "boundary" or "whitespace" in the options schema, in fact, which leads me to believe that perhaps that functionality simply never got implemented.

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

The strip-boundary-space option was hidden in the latest parse-fragment code as it did not work reliably in LibXml2 (the option was passed to the library). The current parse() function does not have this option. It is pending a reimplementation in our code.

I guess a solution would be to update the documentation of the backwards-compatible parse-xml-fragment() to mention the option should not be used.

--

Nicolae Brinza (nbrinza)
Changed in zorba:
status: New → Fix Committed
Changed in zorba:
milestone: none → 2.9
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.