[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [PATCH] Fix XRC validation errors
From: |
Greg Chicares |
Subject: |
Re: [lmi] [PATCH] Fix XRC validation errors |
Date: |
Fri, 17 Apr 2015 15:33:27 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 2015-04-07 20:16, Vadim Zeitlin wrote:
[...]
> Combining the instructions from the blog with the schema above, you should
> be able to run
>
> java -jar jing.jar -C catalog.xml -c lmi_xrc_schema.rnc *.xrc
>
> without any errors after applying the patch.
I still have many validation errors after applying this patch.
Without the patch, I do this (without "-C catalog.xml"):
/lmi/src/lmi[0]$export jar_dir=/opt/lmi/third_party/rng
/lmi/src/lmi[0]$java -jar $jar_dir/jing.jar -c xrc.rnc *.xrc 2>&1 |less -S -N
and count 247 lines of output. Then I apply the patch:
/lmi/src/lmi[0]$patch <a00/vs/0001-Fix-XRC-validation-errors.patch
patching file gpt.xrc
patching file mec.xrc
patching file skin.xrc
patching file skin_coli_boli.xrc
patching file skin_group_carveout.xrc
patching file skin_group_carveout2.xrc
patching file skin_reg_d.xrc
patching file skin_single_premium.xrc
patching file skin_variable_annuity.xrc
/lmi/src/lmi[0]$
and repeat the command, obtaining 198 lines of output:
/lmi/src/lmi[0]$java -jar $jar_dir/jing.jar -c xrc.rnc *.xrc 2>&1 |wc -l
198
The first diagnostic in 'skin.xrc' is:
144 C:\lmi\src\lmi\skin.xrc:2163:78: error: character content of element "fl
144 ag" invalid; must be a string matching the regular expression "(wxGROW|w
144 xEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWES
144 T|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)( *\| *(wxGROW|w
144 xEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWES
144 T|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN))*", must be a s
144 tring matching the regular expression "(wxALIGN_CENTER|wxALIGN_CENTRE|wx
144 ALIGN_CENTER_HORIZONTAL|wxALIGN_CENTRE_HORIZONTAL|wxALIGN_LEFT|wxALIGN_R
144 IGHT|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|w
144 xSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)( *\| *(wxALIGN_CEN
144 TER|wxALIGN_CENTRE|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTRE_HORIZONTAL|w
144 xALIGN_LEFT|wxALIGN_RIGHT|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wx
144 SOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDE
144 N))*" or must be equal to "*** Sizer flags excluding horizontal alignmen
144 t ones ***"
A unidiff of an untouched local mirror against the patched 'skin.xrc' says:
@@ -2159,11 +2155,10 @@
<growablerows>0</growablerows>
<object class="sizeritem">
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>4</border>
<object class="wxStaticBoxSizer">
- <flag>wxGROW|wxALL</flag>
<orient>wxVERTICAL</orient>
<label>Salary-based specified amount</label>
<object class="sizeritem">
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
and the last line of the unidiff above (unaffected by the patch) is line 2163,
which is the line given in the diagnostic quoted earlier.
I get the same number of diagnostics (198) if I validate with the schema in
Vaclav's original email here:
http://lists.nongnu.org/archive/html/lmi/2013-10/msg00003.html
(after removing one or two stray semicolons that 'jing' complained about).
Am I right in guessing that schema validation is intended to succeed only
after applying the entire series of patches (one in the present email thread,
and eight more in a later thread)?
I tried running the schema in a separate directory where I've applied all
the patches (and we've confirmed that the copy of that directory that I
sent in private email matches your local tree). Everything validates except
for these two errors:
C:\downloads\src\lmi\rounding_view.xrc:42:82: error: character content of
element "flag" invalid; must be a string matching the regular expression
"(wxGROW|wxEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)(
*\|
*(wxGROW|wxEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN))*",
must be a string matching the regular expression
"(wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL|wxALIGN_TOP|wxALIGN_BOTTOM|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)(
*\|
*(wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL|wxALIGN_TOP|wxALIGN_BOTTOM|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN))*"
or must be equal to "*** Sizer flags
excluding vertical alignment ones ***"
C:\downloads\src\lmi\rounding_view.xrc:190:82: error: character content of
element "flag" invalid; must be a string matching the regular expression
"(wxGROW|wxEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)(
*\|
*(wxGROW|wxEXPAND|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN))*",
must be a string matching the regular expression
"(wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL|wxALIGN_TOP|wxALIGN_BOTTOM|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN)(
*\|
*(wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL|wxALIGN_TOP|wxALIGN_BOTTOM|wxALL|wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxSHAPED|wxSTRETCH_NOT|wxRESERVE_SPACE_EVEN_IF_HIDDEN))*"
or must be equal to "*** Sizer flags
excluding vertical alignment ones ***"
Do you see the same outcome?