Go directly to main content.

Required number of "case" elements in "switch" elements

Project:EPUB Maintenance
Component:Open Publication Structure (OPS)
Category:bug report
Priority:normal
Assigned:Unassigned
Status:open

Section 2.6.3.1.1: switch Element says that the switch element "contains zero or more case elements", but the OPS schema uses the "oneOrMore" Relax NG pattern for the case.

Which is it?

Description
Issue Id: 
55
Resolution: 

Insert resolution here.

Comments

#1

A similar sentence can be found in the next section, 2.6.3.1.2: case Element.

#2

On this one it seems that a switch with zero cases is pretty useless, so I'd tend to go with the schema and fix the language. That could be an "errata." Yes, one could have a ops:switch with only ops:default... but, why? Might as well omit both the switch and default, and just leave the markup.

However, it is at least possible that ops:switch could be deprecated (or changed substantively) in EPUB3, so perhaps push it over there as a "future consideration."

Peter, interested in your comment.

#3

I think requiring at least one case is a good idea.

#4

I think that changing the prose here causes almost no troubles.

#5

Noting that EPUB3 also requires at least one case element (both in prose and schema this time). The proposed prose fix seems like the way to go. See also http://code.google.com/p/epubcheck/issues/detail?id=132.

Valid XHTML 1.0!

Powered by Drupal, an open source content management system