Re: [xml] Problem validating documents containing public entities with empty URIs

On Fri, Sep 10, 2010 at 15:12, Daniel Veillard <veillard redhat com> wrote:
On Fri, Sep 10, 2010 at 02:52:17PM +0200, Nikolai Weibull wrote:

Wow, that was a fast response!

<!DOCTYPE a PUBLIC "" "a.dtd" [
<!ENTITY b PUBLIC "b" "">

If you look at RFC3986 you will see that and empty string is a correct
URI interpreted as an URI-Reference pointing to the containing document.

Hence using "" means 'this document' and the behaviour you are seing.

Aha, that explains a lot.  Thank you for taking the time to provide
such an enlightening, albeit at the same time stupefying, answer.

All normal, you asked for something foolish, and you got it :-)
Instead of trying to turn around thefact taht an URI is being needed
by trying to avoid it, define and URI, it's needed, it's mandated by the
XML specification (contrary to e.g. SGML).

This is a clientâs documents (well, the above was a simplified
example, but they send us documents that look like the one above).
Iâm just trying to validate them before I process them with xsltproc,
which also barfs on this crap.  I was hoping that I wouldnât have to
tell them to get serious and that I could get around it by using the
XML catalog trick to point xmllint and xsltproc to the right document.

So thereâs no way around this other than entering something as the URI?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]