-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing an external DTD fails #59
Comments
Yes, we don't currently support any DTD. This example fails: extern crate sxd_document;
use sxd_document::parser;
fn main() {
let xml = r##"<?xml version="1.0"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML />
"##;
parser::parse(xml).unwrap();
} Do you need access to the DTD? I believe it would be easy enough to parse it and simply throw it away. Are you interested in contributing via pull requests at all? |
(Duplicate of #50) |
We don't currently have a need to access to the dtd, and we are currently dropping the head of the response stream before we pass it to the parser (our hacky workaround). It's funny because the parser has strong opinions about what attributes are present inside the doctype tag, so I thought this would be expected to work. I'd be glad to send a PR if I knew what I was doing ;) |
I'm going to go ahead and move discussion into the linked issue (#50) |
Sorry for the lengthy blob of xml, but I'm sort of at a loss for why this might be failing:
The parse call fails with
which by my math is somewhere inside the dtd uri. It parses successfully if I remove the doctype tag entirely, but I can't imagine where the quotes should be tripping this up.
The text was updated successfully, but these errors were encountered: