We have blocks of XML which represents dialog templates. Here is an example with 2 buttons and one number edit control:
<dialogex caption="Activity" charset="1" cx="522" cy="348" decplaces="5" field="activity" fontname="MS Shell Dlg" italic="0" major_version="1" minor_version="0" ptsize="8" resid="130" style="DS_SETFONT|DS_MODALFRAME|DS_FIXEDSYS|WS_POPUP|WS_CAPTION|WS_SYSMENU" type="DIALOGEX" weight="400" x="0" y="0"> <pushbutton caption="OK" cx="63" cy="15" resid="IDOK" style="WS_TABSTOP" x="453" y="7"/> <pushbutton caption="Cancel" cx="63" cy="15" resid="IDCANCEL" style="WS_TABSTOP" x="453" y="28"/> <editnumber cx="100" cy="12" decplaces="3" field="no_CSP" formula=".//activity/@LCSP - .//activity/@FCSP + 1" numeric="int" resid="218" style="ES_AUTOHSCROLL|ES_READONLY|WS_BORDER|WS_TABSTOP" x="84" y="297"/> </dialogex> You can see that the <editnumber> element has an attribute called "formula" which contains an XQuery expression. This works fine until the XQuery expression contains something like the following: "<data>.//activity/@status</data>" The problem is that Xerces does not like an attribute value that contains the '<' and '>' characters. When I try to parse the <dialogex> element with a formula attribute containing the above XQuery expression, it goes wobbly, and fails. Does anyone know a way around this? (Of course I could pre-parse the formula string, and replace all '<' characters with "@@lt" for example, and similarly for '<', and hope that our formula never needs to contain "@@lt" and "@@gt". But I'd rather find a more elegant method.) -- View this message in context: http://old.nabble.com/How-to-have-an-attribute-which-contains-XML-tp26392607p26392607.html Sent from the Xerces - C - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org