Nul charref in element content does not throw error
Bug #1130998 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Confirmed
|
Medium
|
Nicolae Brinza |
Bug Description
The following query:
<elem>�</elem>
should throw XQST0090 because character 0 (NUL) is not legal in XML. However, it succeeds and returns the element with a NUL character in the content. eg, on Linux,
% bin/zorba -f -q /tmp/bar.xq |cat -vet
<?xml version="1.0" encoding="UTF-8"?>$
<elem>^@</elem>
where ^@ is how "cat -vet" displays NUL characters.
This is causing the FOTS case prod-DirElemCon
Related branches
lp:~zorba-coders/zorba/bug-1130998
- Chris Hillery: Needs Fixing
- Nicolae Brinza: Pending requested
-
Diff: 38621 lines (+9087/-9029)8 files modifiedsrc/compiler/parser/jsoniq_parser.cpp (+1497/-1497)
src/compiler/parser/jsoniq_parser.hpp (+6/-6)
src/compiler/parser/jsoniq_scanner.cpp (+3076/-3036)
src/compiler/parser/jsoniq_scanner.l (+1/-1)
src/compiler/parser/xquery_parser.cpp (+1535/-1535)
src/compiler/parser/xquery_parser.hpp (+6/-6)
src/compiler/parser/xquery_scanner.cpp (+2965/-2947)
src/compiler/parser/xquery_scanner.l (+1/-1)
Changed in zorba: | |
importance: | Undecided → Medium |
milestone: | none → 2.9 |
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
status: | In Progress → Won't Fix |
status: | Won't Fix → In Progress |
Changed in zorba: | |
assignee: | Luis Rodriguez Gonzalez (kuraru) → Nicolae Brinza (nbrinza) |
Changed in zorba: | |
milestone: | 2.9 → 3.0 |
Changed in zorba: | |
status: | In Progress → Confirmed |
milestone: | 3.0 → none |
To post a comment you must log in.
As a note, Zorba *does* throw XQST0090 when � appears in a single literal:
% bin/zorba -q '"�"' zo/src/ src/compiler/ api/compiler_ api.cpp: 201
<.>:1,2: static error [err:XQST0090]: "Invalid XML v1.0 codepoint in the string literal ""�""": invalid character reference in XML ; raised at /home/ceej/