[Home] [By Thread] [By Date] [Recent Entries]

  • From: Michael Glavassevich <mrglavas@c...>
  • To: "Andrew Welch" <andrew.j.welch@g...>
  • Date: Mon, 8 Dec 2008 10:22:58 -0500

"Andrew Welch" <andrew.j.welch@g...> wrote on 12/08/2008 09:59:34 AM:

> >> I have a similar issue, for example there are some RSS feeds which
> >> contain entity references but no doctype:
> >>
> >> <foo>foo &euro; bar</foo>
> >>
> >
> > Similar but not the same. Since there is no DOCTYPE or external DTD subset,
> > there is no possibility that these entities could be resolved. Consequently
> > such a document is unambiguously malformed.
>
> That's understandable, it's a pity that's decided before we get chance
> to fool the parser into thinking otherwise...

With SAX you can insert an external DTD subset [1] into the document programmatically. Just register an instance of EntityResolver2 and return something from getExternalSubset().

> --
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


[1] http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ext/EntityResolver2.html#getExternalSubset(java.lang.String,%20java.lang.String)

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@c...

E-mail: mrglavas@a...



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member