Skip to content

Failure if the target namespace is unqualified #3

@dholroyd

Description

@dholroyd

e.g. MPD.xsd,

$ cargo run --package xml-schema --bin gen DASH-MPD.xsd > dash-mpd.rs                                                                                      
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s                                                                                                                                                      
     Running `target/debug/gen DASH-MPD.xsd`                                                                                                                                                                       
thread 'main' panicked at 'Some("urn:mpeg:dash:schema:mpd:2011")', src/libcore/option.rs:1034:5

I think this is because of the namespace definition in the schema:

<xs:schema
  targetNamespace="urn:mpeg:dash:schema:mpd:2011"
  attributeFormDefault="unqualified"
  elementFormDefault="qualified"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns="urn:mpeg:dash:schema:mpd:2011">

...the targetNamespace matches the unqualified namespace definition xmlns="urn:mpeg:dash:schema:mpd:2011".

(As a workaround, I can alter the schema so that the namespace definition is qualified, e.g. xmlns:mpd="urn:mpeg:dash:schema:mpd:2011")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions