abdelazer / openpub

Automatically exported from code.google.com/p/openpub
0 stars 0 forks source link

Element definition for opds:price in schema and spec definition for currencycode #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current definition for opds:price in the spec says that no currency symbols 
should be used as part of the content.

As written now, the schema allows any text whatsoever as content, and therefore 
will not flag an invalid opds:price that does contain a symbol.

I can easily add a list of proscribed currency symbols, but we are not 
restricting the element to numeric content, so I'm not clear on the utility of 
this.

Additionally, the text for the currencycode attribute currently and incorrectly 
reads "the value of the 'currencycode' attribute MUST be an 'Alphabetic code' 
from [ISO4217]." 

This could read "MUST be an active code from [ISO4127]."

Or: "MUST be an 'Alphabetic code' or a 'Numeric code' from [ISO4127]."

Or: "MUST be an active code from [ISO4127] representing a currency." 

This last option would remove gold, silver, platinum, IMF funds and codes for 
some other accounting mechanisms, as well as codes for testing.

What is the intention of the group? Since we are enumerating the acceptable 
options anyway, I favor the last choice.

Roger

Original issue reported on code.google.com by rsperb...@gmail.com on 18 Aug 2010 at 8:08

GoogleCodeExporter commented 9 years ago
"""we are not restricting the element to numeric content"""

Should we? 

    [0-9]+\.[0-9]+ 

I'll add """MUST be an active code from [ISO4127] representing a currency.""""

Original comment by abdela...@gmail.com on 18 Aug 2010 at 8:15

GoogleCodeExporter commented 9 years ago
Roger: Please clarify this issue by EOD Monday 23 August 2010.

Original comment by abdela...@gmail.com on 23 Aug 2010 at 5:35

GoogleCodeExporter commented 9 years ago
This issue is resolved.

opds:price is now defined as non-negative xsd:decimal (eg, numeric content with 
localization appropriate decimal separator, 0.0 or greater). 

Currency symbols are not permitted, of course; a comment points this out, just 
in case.

The currencycode attribute is restricted to a list of enumerated values for 
currencies, which excludes some legal ISO4217 codes (for gold, for instance). 
This is explained in the comments in the schema.

Original comment by rsperb...@gmail.com on 23 Aug 2010 at 3:37

GoogleCodeExporter commented 9 years ago
Changed status to "fixed"

Original comment by rsperb...@gmail.com on 23 Aug 2010 at 3:38