Discussion:
need help demystifying xml error "asynchronous entity"
Axel Hecht
2011-02-23 15:08:32 UTC
Permalink
Hi,

I'm trying to beef up the checks for compare-locales, and I'm running
into the following:

For an entity like

<!ENTITY foo "stuff with </bad> bar">

I get an "asynchronous entity" error if I use it in a xml doc like

<!DOCTYPE elem [
<!ENTITY foo "stuff with </bad> bar">
]>
<elem>&foo;</elem>

What I'm wondering, is there a way to rephrase that message that at
least I understand what that means?

I assume that this means that you can't put a start tag in one and the
end tag in the next entity, but that's just me guessing. I tried to read
the expat code, and couldn't figure out if I'm guessing right.

Does one of you know?

Thanks

Axel
Boris Zbarsky
2011-02-23 15:36:01 UTC
Permalink
Post by Axel Hecht
I assume that this means that you can't put a start tag in one and the
end tag in the next entity
That's correct. At least with expat. I can't find what the XML spec
calls for here....

-Boris
Boris Zbarsky
2011-02-23 15:36:55 UTC
Permalink
Post by Axel Hecht
I get an "asynchronous entity" error if I use it in a xml doc like
Oh, and that error string is, imo, daft. It's not an "asynchronous"
entity; it's one that would make expat's state be out of sync with the
XML being processed, which is totally different.

-Boris

Loading...