[R] odfWeave & XML error in post-processing

Rob James rob at aetiologic.ca
Sat Oct 10 03:13:26 CEST 2009


Just so we complete (partially) the web-record...

Some further hunting determined that  the &apos  was an  apostrophe - 
obvious only in retrospect!  Removal of this character has resolved the 
Entity errors, but not the xmlParseStartTag: invalid element name errors.

I had assumed that the two errors were dependent, but they are not.

odfWeave does have some ability with its translate command to address 
some XML/OO special characters, but I have not explored this facet of 
odfWeave yet, and I was a bit surprised that the use of this common 
grammatical mark generated an error, but..

Now, in search of a cause for the invalid element name error(s).

Thanks to Duncan for his help.



Duncan Temple Lang wrote:
> Hi Rob.
>
> Without the file content_1.xml or any information
> from the R call stack (e.g. options(error = recover)
> and then run the command and dynamically explore the
> state of affairs when the error occurs), there is
> no way for us to know what the problem might be.
>
> Somehow, the XML parser appears to be seeing a
>      <token
> and token is not a legitimate XML element name. It may also be
> seeing ' which would identify an XML entity.
>
> Assuming that this is what the XML parser is seeing,
> the question is how they got into the document.
>
> So we need more to start diagnosing the problem.
>
>   D.
>
> Rob James wrote:
>   
>> I've been happily building a file with odfWeave, and just as the hour
>> draws nigh for it to be sent off, odfWeave or XML throws  the following
>> catastrophic error:
>>
>>
>> ...this is the tail of entirely uneventful processing of input file.....
>>
>> 31 : term xml(label=LR_Fall_Model_Results)
>>  32 : term verbatim(label=LR_Model_Fall_graph)
>>  33 : term xml(label=LR_OMC_tab)
>>
>> 'content_1.xml' has been Sweaved
>>
>> Removing content.xml
>>
>> Post-processing the contents
>> xmlParseStartTag: invalid element name
>> Entity 'apos' not defined
>> Entity 'apos' not defined
>>
>>
>> This triplet of errors XMLParse, and duplicate "Entity" lines is
>> reported several times, then XML or odfWeave  packs up its toys, and
>> goes home without an output file.
>>
>> I'd (desperately) love any insights anyone might have.
>>
>> Thanks,
>>
>> Rob
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>     
>
>




More information about the R-help mailing list