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

"Delete" mode in customizations does not work as expected #21

Closed
ahankinson opened this issue Jun 5, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@ahankinson
Copy link
Contributor

commented Jun 5, 2014

In the MEI project, we have a customization for generating a schema only for Common Music Notation. In this customization we have four statements that are expected to delete classes in the mei-source.xml document. These statements can be seen here:

https://code.google.com/p/music-encoding/source/browse/trunk/customizations/mei-CMN.xml#53

When running Roma or the teitorelaxng script, the delete mode does not actually delete the definition from the resulting RelaxNG. Changing the mode to replace, however, does remove the definition from the resulting RNG schema.

Is this expected behaviour, or is there a bug in the deletion mode?

(Tagging @pe-ro since he's the one who discovered the bug. Also @raffazizzi might want to know about this too.)

@sebastianrahtz

This comment has been minimized.

Copy link
Member

commented Jun 9, 2014

interesting. it does sound like a bug. I'll try and look, but if anyone else can spend time too that would be helpful

@raffazizzi

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2014

I can replicate this problem. Also, it persists when I comment out the classSpecs and exclude the models in the moduleRef:

<moduleRef key="MEI.shared" exclude="model.scorePart.mensuralAndNeumes 
model.sectionPart.mensuralAndNeumes 
model.staffPart.mensuralAndNeumes 
model.layerPart.mensuralAndNeumes"/>
@sebastianrahtz

This comment has been minimized.

Copy link
Member

commented Jun 24, 2014

I can't replicate this problem when making a TEI schema:

 <schemaSpec ident="test">
<moduleRef key="tei"/>
<moduleRef key="teiHeader"/>
<moduleRef key="textstructure"/>
<moduleRef key="core"/>
    <classSpec ident="model.div1Like" module="tei" type="model"  mode="delete"/>
  </schemaSpec>

in this case the model.div1Like is correctly removed. I wonder what the difference is? Is it easy to make an MEI example I can run freestanding? ie with an @source so that it picks up the base system.

@raffazizzi

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2014

I've sent you both a link to a standalone ODD privately (email). The ODD works with teitorelaxng and reproduces the error:

classSpec[@mode=delete] does not remove model.scorePart.mensuralAndNeumes
while the other classSpec[@mode=replace] do.

@sebastianrahtz

This comment has been minimized.

Copy link
Member

commented Jun 29, 2014

by the way, the attribute on is @except not @exclude

@sebastianrahtz

This comment has been minimized.

Copy link
Member

commented Jun 29, 2014

I believe the missing code is now in place and that the rogue classes are consigned to history.

@raffazizzi

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2014

Great! Both classSpec[@mode=delete] and moduleRef[@except] seem to work as expected now.

@sebastianrahtz

This comment has been minimized.

Copy link
Member

commented Jul 1, 2014

HOWEVER, the TEI Council just told me to change odd2odd so that moduleRef[@except]
canl not be used to exclude classes or macros. @except and @include only work for elements.
cf https://sourceforge.net/p/tei/feature-requests/499/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.