Team,
I am trying to create upload tools for some data and am having issues with data in the prolog of a XML document.
I have a document, lets say that starts out like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE dmodule [
<!ENTITY esd SYSTEM "esd.jpg" NDATA jpg>
<!ENTITY % ISOEntities PUBLIC "ISO 8879-1986//ENTITIES ISO Character Entities 20030531//EN//XML" "
http://www.s1000d.org/S1000D_2-2/xml_schema/ent/ISOEntities">
%ISOEntities;
]>
<dmodule xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="
http://www.purl.org/dc/elements/1.1/" xmlns:xlink="
http://www.w3.org/1999/xlink">
Anyone familiar might recognize this as S1000D XML data.
If I upload this using the Java client, it goes in without a hitch. If I try to pass this to an XQL through the web as XML Postdata, and then store it using xmldb:store everything works fine as well.
However, I have discovered that the XML data that gets posted is treated as a xs:string if there is anything in the prolog area (between <?xml?> and the <dmodule> tag). Since I am trying to read some data out of the XML before storing it, I need it to be treated as a node() and not as an xs:string.
This works great if I just remove the <!DOCTYPE> bit, or use the Java client. However, removing the DOCTYPE bit, ends up with entities failing to resolve and other errors arise.
Can anyone help de-mystify this problem for me, or point me to the code that the Java client is using to get around this?
Thanks,
Andrew
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open