Skip to content

Empty prefix and url namespace inserted for basic root element #50

@drott

Description

@drott

For a basic document source without DOCTYPE or xml processing instruction, an extra "":"" entry is added to namespaces.

<root xmlns:foo="http://www.example.com" attr="test2" foo:attr="test" />

Expected namespaces in StartElement event:

{
 "foo": "http://www.example.com", 
 "xml": "http://www.w3.org/XML/1998/namespace", 
 "xmlns": "http://www.w3.org/2000/xmlns/"
}

Actual namespaces:

{
 "": "", 
 "foo": "http://www.example.com", 
 "xml": "http://www.w3.org/XML/1998/namespace", 
 "xmlns": "http://www.w3.org/2000/xmlns/"
}

Test case in:
https://github.com/drott/xml-rs/blob/emptyNsForRoot/tests/streaming.rs#L122

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions