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

MPD xs:string parse fix #1575

Merged

Conversation

matt-hammond-001
Copy link
Contributor

@matt-hammond-001 matt-hammond-001 commented Sep 6, 2016

This PR is intended to fix #1573 . It adds a StringMatcher to the DASH parser.

The issue identified the specific case of Period@id attributes, however there are many other attributes in the DASH MPD that, according to the schema, are also type xs:string. StringMatcher therefore contains a mapping table listing every attribute I could find the the schema that is defined as being of type xs:string.

The StringMatcher needs to know the name of the node as well as the name of the attribute. xml2json.js was therefore modified to provide this as an argument to the test method. Although attributes currently have an ownerElement property that would provide this information (without needing to modify xml2json.js) this will eventually be deprecated in DOM4+ according to https://developer.mozilla.org/en-US/docs/Web/API/Attr

@matt-hammond-001
Copy link
Contributor Author

d591616 adds some other attributes whose types are variants on a basic xs:string and which should be parsed as strings.

@davemevans
Copy link
Contributor

LGTM.

@dsparacio dsparacio merged commit 5865327 into Dash-Industry-Forum:development Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numeric Period IDs incorrectly parsed into Number type when should be kept as a string
3 participants