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

Fix xpath indexing to 1-based and support adding attribute which does not exist in existing dom #2

Conversation

chanyk-joseph
Copy link

@chanyk-joseph chanyk-joseph commented Nov 10, 2020

  1. XPath indexing is 1-based, eg:
   <add sel="/MPD/Period[@id=&apos;81&apos;]/AdaptationSet[2]/SegmentTemplate/SegmentTimeline">
      <S t="160162777" d="40106667"/>
   </add>

AdaptationSet[2] refers to 2nd element, i.e. index 1 in 0-based indexing

  1. Adding new attribute which does not exist in existing DOM, see:
    https://tools.ietf.org/html/rfc5261#section-4.3.2
<add sel="/MPD/Period[@id=&apos;81&apos;]/AdaptationSet[2]/SegmentTemplate/SegmentTimeline/S[4]" type="@r">1</add>

technogeek00 added a commit that referenced this pull request Nov 11, 2020
- Full support for DASH specified xpath restrictions
- Support for add/replace/delete operations in patch
- Validation of Patch on receive
- Handling of empty Patch semantics

This commit is rebased first pass on to latest dash.js, includes the
additional fixes previously provided:
- Patch operation ironing fix (#1) - @thmatuza
- Xpath indexing and add attribute operation (#2) - @chanyk-joseph
technogeek00 added a commit that referenced this pull request Nov 11, 2020
- Full support for DASH specified xpath restrictions
- Support for add/replace/delete operations in patch
- Validation of Patch on receive
- Handling of empty Patch semantics

This commit is rebased first pass on to latest dash.js, includes the
additional fixes previously provided:
- Patch operation ironing fix (#1) - @thmatuza
- Xpath indexing and add attribute operation (#2) - @chanyk-joseph
technogeek00 added a commit that referenced this pull request Nov 12, 2020
- Full support for DASH specified xpath restrictions
- Support for add/replace/delete operations in patch
- Validation of Patch on receive
- Handling of empty Patch semantics

This commit is rebased first pass on to latest dash.js, includes the
additional fixes previously provided:
- Patch operation ironing fix (#1) - @thmatuza
- Xpath indexing and add attribute operation (#2) - @chanyk-joseph
@technogeek00
Copy link
Owner

I've fully pulled the implementation up to date to the tip of dashif/development and incorporated this change directly in the commit. I'll close this PR out and shutdown this old branch.

technogeek00 added a commit that referenced this pull request Feb 19, 2021
…stry-Forum#3451)

* Implementation of MPEG-DASH 5th Edition Patching Semantics

- Full support for DASH specified xpath restrictions
- Support for add/replace/delete operations in patch
- Validation of Patch on receive
- Handling of empty Patch semantics

This commit is rebased first pass on to latest dash.js, includes the
additional fixes previously provided:
- Patch operation ironing fix (#1) - @thmatuza
- Xpath indexing and add attribute operation (#2) - @chanyk-joseph

* Addressing PR Feedback

* Add missing additional test case

Co-authored-by: Daniel Silhavy <daniel.silhavy@fokus.fraunhofer.de>
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.

2 participants