You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by To...@medibank.com.au on 2000/11/09 03:41:30 UTC

DOCTYPE PUBLIC / SYSTEM DTD URI specification troubls


Hi,
     I am relatively new to XML and xerces. I am having some trouble with the
DOCTYPE declaration.

During my unit testing of my project my DOCTYPE declaration has been:

<!DOCTYPE EligCheckRequest PUBLIC
"http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd"
"file:/D:/B2B_2/B2B_Properties/au/com/medibank/util/xml/DTDs/eligcheckrequest_v3.dtd">

which worked fine (ie parsed correctly).

However when I tried to do a proper test (without the SYSTEM component)

ie

<!DOCTYPE EligCheckRequest PUBLIC
"http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd">

I get an exception

          Error: White space is required between the public identifier and the
system identifier.
au.com.medibank.util.xml.TranslationException: White space is required between
the public identifier and the system identifier.
     java.lang.Throwable(java.lang.String)
     java.lang.Exception(java.lang.String)
     au.com.medibank.util.xml.TranslationException(java.lang.String)
     java.lang.Object
au.com.medibank.util.xml.BeanXMLCodec.convertXMLToBean(java.lang.String,
java.util.Properties)
     java.lang.Object
au.com.medibank.util.xml.test.TestTranslation.xmlToBean(java.lang.String,
java.lang.String)
     boolean
au.com.medibank.util.xml.test.TestTranslation.testRequestMessageTranslation(java.lang.String,

java.lang.String)
     void au.com.medibank.util.xml.test.TestTranslation.main(java.lang.String
[])

which seemed to indicate that it was looking for a PUBLIC and a SYSTEM location.

When I alter the DOCTYPE declaration so that it has an empty string "" in the
SYSTEM location it works fine ?

ie
<!DOCTYPE EligCheckRequest PUBLIC
"http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd" "">

So is there some property or feature that I am supposed to set so this works ???
 Before anyone asks- I have implemented the EntityResolver interface at it is
locating the correct file from the URI (ie it works with the emtpy string SYSTEM
 locator).
I am at a loss and would appreciate any suggestions.

Thanks
          Todd




The information contained in or attached to this message is intended
only for the people it is addressed to. If you are not the intended
recipient, any use, disclosure or copying of this information is
unauthorised and prohibited. This information may be confidential
or subject to legal privilege. It is not the expressed view of Medibank
Private Limited or any of its subsidiaries unless it is authorised by a
person with actual authority. To the fullest extent allowed by law,
Medibank Private cannot accept liability for any virus damage caused
by this message.



Re: DOCTYPE PUBLIC / SYSTEM DTD URI specification troubls

Posted by Eric Ye <er...@locus.apache.org>.
if you have <!DOCTYPE EligCheckRequest PUBLIC "a publicid"...
it is required that a system id immediately follows the publid id, it can't
be removed base in Production 28 and 75 in XML1.0 spec.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: <To...@medibank.com.au>
To: <xe...@xml.apache.org>
Sent: Wednesday, November 08, 2000 6:41 PM
Subject: DOCTYPE PUBLIC / SYSTEM DTD URI specification troubls


>
>
> Hi,
>      I am relatively new to XML and xerces. I am having some trouble with
the
> DOCTYPE declaration.
>
> During my unit testing of my project my DOCTYPE declaration has been:
>
> <!DOCTYPE EligCheckRequest PUBLIC
> "http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd"
>
"file:/D:/B2B_2/B2B_Properties/au/com/medibank/util/xml/DTDs/eligcheckreques
t_v3.dtd">
>
> which worked fine (ie parsed correctly).
>
> However when I tried to do a proper test (without the SYSTEM component)
>
> ie
>
> <!DOCTYPE EligCheckRequest PUBLIC
> "http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd">
>
> I get an exception
>
>           Error: White space is required between the public identifier and
the
> system identifier.
> au.com.medibank.util.xml.TranslationException: White space is required
between
> the public identifier and the system identifier.
>      java.lang.Throwable(java.lang.String)
>      java.lang.Exception(java.lang.String)
>      au.com.medibank.util.xml.TranslationException(java.lang.String)
>      java.lang.Object
> au.com.medibank.util.xml.BeanXMLCodec.convertXMLToBean(java.lang.String,
> java.util.Properties)
>      java.lang.Object
> au.com.medibank.util.xml.test.TestTranslation.xmlToBean(java.lang.String,
> java.lang.String)
>      boolean
>
au.com.medibank.util.xml.test.TestTranslation.testRequestMessageTranslation(
java.lang.String,
>
> java.lang.String)
>      void
au.com.medibank.util.xml.test.TestTranslation.main(java.lang.String
> [])
>
> which seemed to indicate that it was looking for a PUBLIC and a SYSTEM
location.
>
> When I alter the DOCTYPE declaration so that it has an empty string "" in
the
> SYSTEM location it works fine ?
>
> ie
> <!DOCTYPE EligCheckRequest PUBLIC
> "http://www.medibank.com.au/B2B/eligcheckrequest_v3.dtd" "">
>
> So is there some property or feature that I am supposed to set so this
works ???
>  Before anyone asks- I have implemented the EntityResolver interface at it
is
> locating the correct file from the URI (ie it works with the emtpy string
SYSTEM
>  locator).
> I am at a loss and would appreciate any suggestions.
>
> Thanks
>           Todd
>
>
>
>
> The information contained in or attached to this message is intended
> only for the people it is addressed to. If you are not the intended
> recipient, any use, disclosure or copying of this information is
> unauthorised and prohibited. This information may be confidential
> or subject to legal privilege. It is not the expressed view of Medibank
> Private Limited or any of its subsidiaries unless it is authorised by a
> person with actual authority. To the fullest extent allowed by law,
> Medibank Private cannot accept liability for any virus damage caused
> by this message.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>