Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling with "xml:" prefixed namespace (#208)
I found parsing XHTML documents like below fails since v3.3.3: ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>XHTML Document</title> </head> <body> <h1>XHTML Document</h1> <p xml:lang="ja" lang="ja">この段落は日本語です。</p> </body> </html> ``` [XML namespace spec][spec] is a little bit ambiguous but document above is valid according to an [article W3C serves][article]. I fixed the parsing algorithm. Can you review it? As an aside, `<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">` style language declaration is often used in XHTML files included in EPUB files because [sample EPUB files][samples] provided by IDPF, former EPUB spec authority, use the style. [spec]: https://www.w3.org/TR/REC-xml-names/#defaulting [article]: https://www.w3.org/International/questions/qa-html-language-declarations#attributes [samples]: https://github.com/IDPF/epub3-samples
- Loading branch information