|
From: Randy J. <rj...@ak...> - 2000-12-08 17:51:51
|
Hi,
I'm using TclXML-1.2 to parse a XML file which among other things contains
some C source code generated from a user interface specification tool.
Character data in the C source code appears to have been properly processed
so that C special characters do not collide with XML special characters
(e.g. "&" is converted to "amp"). This XML file is parsed cleanly by TclXML
_without_ the C code in it. With the C code in it, it can be parsed cleanly
by XMLSpy editor. There is a TclXML "Highlight.tcl" example I pulled off the
web, it has the same problem with the XML file in question that my script
does.
When my script parses the XML file, I keep getting the error indicated in
the partial stack trace below. I've also included a fragment of the XML file
below. I've attempted to modify the sgml.tcl Entity and parseEvent routines
to work around this problem but without any success. Any suggestions are
greatly appreciated!
Thanks in Advance,
Randy Jones
Fragment of XML file where problem occurs.
---------------
...
<handler_list>
<hd type="0" req_param_mask="0x00000001" opt_param_mask="0x00000000"
func="RCC_show_alarm_status">
extern RLSTATUS
RCC_show_alarm_status(cli_env *pCliEnv, paramList *pParams, sbyte *pAuxBuf)
{
RLSTATUS status = OK;
sbyte *pVal;
paramDescr *pParamDescr;
sbyte *pOutputBuf;
Length outputLen;
/* get required parameter */
status = RCC_DB_RetrieveParam(pParams, NULL, mShowAlarmStatus_NULL1,
&pParamDescr );
the problem occurs when the parser processes the & field in the line
above.
if ( OK != status )
{
...
A partial stack trace is;
-------------
can't read "options(-statevariable)": no such variable
while executing
"upvar #0 $options(-statevariable) state"
(procedure "Entity" line 3)
invoked from within
"Entity options {} ::::sgml::noop ::sgml::EntityPredef amp"
(in namespace inscope "::sgml" script line 1)
invoked from within
"namespace inscope ::sgml {Entity options {} ::::sgml::noop
::sgml::EntityPredef} {amp} "
("uplevel" body line 12)
invoked from within
"uplevel #0 ::::sgml::noop {{
extern RLSTATUS
RCC_show_alarm_status(cli_env *pCliEnv, paramList *pParams, sbyte *pAuxBuf)
\\{
RLSTATUS status =..."
("eval" body line 1)
invoked from within
"eval $text"
(procedure "::sgml::parseEvent" line 326)
invoked from within
"::sgml::parseEvent {?xml {} { version="1.0"?} {
.....End of Partial Stack Trace.
--------------------
|