I triggered a bug.
make basex -q 'declare option output:cdata-section-elements "desc M";document{(doc("AMFMXTaiwan.gpx")//*:wpt[1]/*:desc/data())}' Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Linux, i386 Stack Trace: <--------------------by the way, there is 1 trailing whitespace here java.lang.ArrayIndexOutOfBoundsException: -1 org.basex.util.list.TokenList.peek(TokenList.java:116) org.basex.io.serial.OutputSerializer.finishText(OutputSerializer.java:230) org.basex.io.serial.Serializer.text(Serializer.java:134) org.basex.query.item.FTxt.serialize(FTxt.java:37) org.basex.query.item.FDoc.serialize(FDoc.java:59) org.basex.core.cmd.AQuery.query(AQuery.java:100) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.server.LocalSession.execute(LocalSession.java:142) org.basex.server.Session.execute(Session.java:38) org.basex.core.Main.execute(Main.java:139) org.basex.BaseX.<init>(BaseX.java:89) org.basex.BaseX.main(BaseX.java:54) make: *** [3] Error 1
basex -q 'declare option output:cdata-section-elements "desc";document{data(doc("AMFMXTaiwan.gpx")//*:wpt[1]/*:desc)}' causes a similar bug. Input was http://radioscanningtw.jidanni.org/images/radioscanningtw/maps/AMFMXTaiwan.g...
All I was trying to do was figure out some way to do like
fn-bea:inlinedXML Parses textual XML and returns an instance of the XQuery 1.0 Data Model.
without having to say goodbye to basex.
You see I'm trying to figure how to get a inner shred of XML, <description><![CDATA[<ul><li>復興廣播電台...</li><li>台北市士...</li><li>丙</li></ul>]]></description> parsed just like the enclosing file. Maybe I need some "util:eval()".
You see I want to access the inner elements with //li[2] etc. instead of matches(*:desc,concat('/li><li>(',$x,')')) like a dweeb. Help.
Thanks; I could strip it down to the following code:
declare option output:cdata-section-elements "x"; document { 1 }
It has been fixed with the latest commit:
https://github.com/BaseXdb/basex/commit/710cbf6505d46d8bbbc6dfb04964390c22e2...
Christian ___________________________
On Wed, Dec 7, 2011 at 3:36 PM, jidanni@jidanni.org wrote:
I triggered a bug.
make basex -q 'declare option output:cdata-section-elements "desc M";document{(doc("AMFMXTaiwan.gpx")//*:wpt[1]/*:desc/data())}' Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_26 OS: Linux, i386 Stack Trace: <--------------------by the way, there is 1 trailing whitespace here java.lang.ArrayIndexOutOfBoundsException: -1 org.basex.util.list.TokenList.peek(TokenList.java:116) org.basex.io.serial.OutputSerializer.finishText(OutputSerializer.java:230) org.basex.io.serial.Serializer.text(Serializer.java:134) org.basex.query.item.FTxt.serialize(FTxt.java:37) org.basex.query.item.FDoc.serialize(FDoc.java:59) org.basex.core.cmd.AQuery.query(AQuery.java:100) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.server.LocalSession.execute(LocalSession.java:142) org.basex.server.Session.execute(Session.java:38) org.basex.core.Main.execute(Main.java:139) org.basex.BaseX.<init>(BaseX.java:89) org.basex.BaseX.main(BaseX.java:54) make: *** [3] Error 1
basex -q 'declare option output:cdata-section-elements "desc";document{data(doc("AMFMXTaiwan.gpx")//*:wpt[1]/*:desc)}' causes a similar bug. Input was http://radioscanningtw.jidanni.org/images/radioscanningtw/maps/AMFMXTaiwan.g...
All I was trying to do was figure out some way to do like
fn-bea:inlinedXML Parses textual XML and returns an instance of the XQuery 1.0 Data Model.
without having to say goodbye to basex.
You see I'm trying to figure how to get a inner shred of XML, <description><![CDATA[<ul><li>復興廣播電台...</li><li>台北市士...</li><li>丙</li></ul>]]></description> parsed just like the enclosing file. Maybe I need some "util:eval()".
You see I want to access the inner elements with //li[2] etc. instead of matches(*:desc,concat('/li><li>(',$x,')')) like a dweeb. Help. _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de