<node mine:foo="abc" />
)
When I parse this document into S, the namespace prefix
on the attribute is dropped. Why and how can I fix it?
TRUE
for the addAttributeNamespaces
argument in the call to xmlTreeParse
.
mine
, in our example)
is defined in the document.
In other words, there must be be an
xmlns:mine="some url"
attribute in some node before or in the node
that is being processed.
If no definition for the namespace is in the document,
the libxml parser drops the prefix on the attribute.
useTagName
is T,
and also that there really is a tag with this name in the
document.
Again, the case is important.
"RSDTD.c", line 110: warning: argument #2 is incompatible with prototype: prototype: pointer to const uchar : "unknown", line 0 argument : pointer to const char
Daneil Veillard might add this.
expressions
option to a value larger than 256.
options(expressions=1000)The main cause of this is that S and R are programming languages not specialized for handling trees. (They are functional languages and have no facilities for pointers or references as in C or Java.)
Parameters are allowed, but the libxml parsing library is fussy about white-space, etc. The following is is ok
<!ELEMENT legend (%PlotPrimitives;)* >but
<!ELEMENT legend (%PlotPrimitives; )* >is not. The extra space preceeding the
)
causes an error in the parser something like
1: XML Parsing Error: ../Histogram.dtd:80: xmlParseElementChildrenContentDecl : ',' '|' or ')' expected 2: XML Parsing Error: ../Histogram.dtd:80: xmlParseElementChildrenContentDecl : ',' expected 3: XML Parsing Error: ../Histogram.dtd:80: xmlParseElementDecl: expected '>' at the end 4: XML Parsing Error: ../Histogram.dtd:80: Extra content at the end of the documentThis can be fixed by adding a call to SKIP_BLANKS at the end of the loop
while(CUR!= ')' { ... }
in the routine
xmlParseElementChildrenContentDecl()
in parser.c
The problem lies in the transition between the different input
buffers introduced by the entity expansion.