[jdom-interest] Parsing a MODS-document with validation fails

Thomas Scheffler thomas.scheffler at uni-jena.de
Thu Aug 4 00:07:54 PDT 2011

Am 25.07.2011 11:21, schrieb Thomas Scheffler:
> Am 25.07.2011 09:05, schrieb Thomas Scheffler:
>> Am 24.07.2011 23:46, schrieb Bradley S. Huffman:
>>> And if the prefix "ns1" is already mapped to another URI because the
>>> user decided to use "ns1" as a prefix, what kind of havoc will this
>>> cause?
>> I got your point! We have to check if "ns"+nsPrefixCount is already
>> defined, if we create it. I do not know though if that is enough. We can
>> do this for the current element and be sure of that. But if for instance
>> we have three tag: "a","b","c", where "a" is parent of "b" an that is
>> parent of "c". There could be an issue if "a" defines a namespace with
>> prefix "ns?" that is in use by "c" and not by "b".
>> When it comes to "b" we see the namespace prefix is currently undefined.
>> And bound it to the new uri. This way the namespace in c changes.
>> So we have to drag every usage of a prefix throughout the document with
>> the "endPrefixMapping" event, that is currently missing an
>> implementation in SAXHandler.
>> Do you agree?
> I prepared a new version of the patch that uses the "endPrefixMapping"
> event to handle namespace prefixes and also checks if "ns"+nsPrefixCount
> is already defined.


are there any news about integrating my patch? Locally it is running 
fine. If you find any issues I am willing to work on that.



More information about the jdom-interest mailing list