Skip to content
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 files with xml:space #46

Open
shepmaster opened this issue May 30, 2017 · 4 comments
Open

Parsing files with xml:space #46

shepmaster opened this issue May 30, 2017 · 4 comments

Comments

@shepmaster
Copy link
Owner

I am getting UnknownNamespacePrefix when trying to parse a file which contains a xml:space attribute. It seems that the xml namespace should be always bounded. Is that the case? Is there a way to achieve it (i.e. to tell the parser that certain namespaces are defined elsewhere)

(Moved from @hgrecco's issue shepmaster/sxd-xpath#112)

@shepmaster
Copy link
Owner Author

It seems that the xml namespace should be always bounded. Is that the case?

Yes, it should be the case, but it appears I never set that up!

@talios
Copy link

talios commented Aug 9, 2017

First few days using Rust here ( loving it ) but hit this issue.

I have a fork where I've added this as a failing test to parser.rs:

    #[test]
    fn support_standard_xml_namespace_prefix() {
        full_parse("<a xml:space=\"preserve\"/>").expect("This should parse.");
    }

Until this ticket is resolved, is there a way of working around this as in the original question?

shepmaster added a commit that referenced this issue Aug 10, 2017
This does not yet *do* anything with the attributes; it only stops
them from preventing a successful parse.

Related to #46
@shepmaster
Copy link
Owner Author

is there a way of working around this

This is the point where I get embarrassed. I had a commit for this that I forgot to push :-(

I've now released 0.2.4 which allows parsing these attributes, but does not actually use them for anything interesting.

@talios
Copy link

talios commented Aug 11, 2017

@shepmaster awesome +1000 :) just parsing is good enough for now. Eventually (if needed) probably honouring the original whitespace when writing out the doc again would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants