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" "
<dmodule xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; xmlns:dc="
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?
Get latest updates about Open Source Projects, Conferences and News.