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

id uniqueness test for encryption.xml #306

Closed
rdeltour opened this issue Oct 15, 2013 · 2 comments
Closed

id uniqueness test for encryption.xml #306

rdeltour opened this issue Oct 15, 2013 · 2 comments
Assignees
Labels
priority: low To be processed when time allows status: has PR The issue is being processed in a pull request
Milestone

Comments

@rdeltour
Copy link
Member

From mgarr...@gmail.com on September 20, 2013 17:43:04

Since the xml sec schemas are not maintained in the epub core specs anymore, moving issue 244 over here.

Id attributes in the encryption file do not report uniqueness errors.

As noted in the RNC:

# (1) ds_IdType
#
# This is defined as xsd:NCName.  One might want to use xsd:ID 
# instead, but jing is likely to report an error.  This is because 
# of the compatibility requirement for the ID/IDREF/IDREFS feature, 
# which is specified in the OASIS committee specification 
# "RELAX NG DTD Compatibility" (December 2001).

It would be useful to add a schematron check to verify IDs in these files.

Original issue: http://code.google.com/p/epubcheck/issues/detail?id=307

@mattgarrish
Copy link
Member

I haven't tried to scour the xmldsig-core schema, but the reason for using NCName is that if the schema is permissive enough in its content models, you can end up with the same element with the same attribute, but where the processor cannot determine the type. James Clark has written about the issue here: http://blog.jclark.com/2009/01/relax-ng-and-xmlid.html

To check uniqueness of id attributes, we need a secondary check in schematron, similar to how opf validation uses NCName for @id and then the id-unique.sch schema validates the IDs. I believe that schema could be reused here.

@mattgarrish mattgarrish assigned rdeltour and unassigned mattgarrish Aug 19, 2014
@rdeltour rdeltour removed the imported label Nov 12, 2018
@rdeltour rdeltour added priority: low To be processed when time allows status: ready for implem The issue is ready to be implemented and removed status: needs review Needs to be reviewed by a team member before further processing labels Feb 26, 2019
@rdeltour
Copy link
Member Author

This looks rather straightforward to implement; we even have an existing generic schematron to check such IDs.

Tentatively adding this to 4.2.0 so that we can close this one.

@rdeltour rdeltour added this to the 4.2.0-RC milestone Feb 26, 2019
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: ready for implem The issue is ready to be implemented labels Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low To be processed when time allows status: has PR The issue is being processed in a pull request
Projects
None yet
Development

No branches or pull requests

2 participants