[vodml] ReferableElement name element

CresitelloDittmar, Mark mdittmar at cfa.harvard.edu
Tue Jan 12 23:40:41 CET 2016


Gerard,

Separate, but related note/question from the EnumLiteral thread.

There you said:
  "However, even when adding vodml-id-s explicitly to enum literals in the
UML, there remains the problem s.
In VO-DML.xsd EnumLiteral extends ReferableElement, and does not add
anything to it. The @name attribute inherited fro ReferableElement is
supposed to represent the literal value. Problem is that @name is
restricted as well, namely by the VODMLName pattern '[a-zA-Z_][\w_]*'."

I didn't notice the pattern in the document (by expression or VODMLName),
so I did some tracking.

VO-DML - Section 4.1: ReferableElement
  4.1.2 name: xsd:NCName[1]
     The name of the model element. Should be an NCName as defined by the
XML schema specification[24]

I followed this:
   http://www.w3.org/TR/xmlschema-2/

Which defines NCName as:
  The ·value space· <http://www.w3.org/TR/xmlschema-2/#dt-value-space> of
*NCName* is the set of all strings which ·match·
<http://www.w3.org/TR/xmlschema-2/#dt-match> the NCName
<http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName>
production of [Namespaces
in XML] <http://www.w3.org/TR/xmlschema-2/#XMLNS>.

[4] NCName ::= (Letter <http://www.w3.org/TR/REC-xml#NT-Letter> | '_') (
NCNameChar <http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCNameChar>
)* /* An XML Name <http://www.w3.org/TR/REC-xml#NT-Name>, minus the ":" */
[5] NCNameChar ::= Letter <http://www.w3.org/TR/REC-xml#NT-Letter> | Digit
<http://www.w3.org/TR/REC-xml#NT-Digit> | '.' | '-' | '_' | CombiningChar
<http://www.w3.org/TR/REC-xml#NT-CombiningChar> | Extender
<http://www.w3.org/TR/REC-xml#NT-Extender>
Which lead to some nasty looking tables of "[#x0041-#x005A]" type stuff.

So, switching to google, I found this:
http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used
"Practical restrictions of an NCName
   The practical restrictions of NCName are that it cannot contain several
symbol characters like :, @, $, %, &, /, +, ,, ;, whitespace characters or
different parenthesis. Furthermore an NCName cannot begin with a number,
dot or minus character although they can appear later in an NCName."

Which seems to match the expressions shown.

This doesn't quite match the VODMLName pattern [a-zA-Z_][\w_]*

Namely, by the inclusion of dot or minus within the NCName.. which (btw)
would make "X-ray" a valid name.
I'll note here, that this statement does not effect the discussion
regrading the EnumLiteral name vs label,
but is related to the definition of ReferableElement.name in the vo-dml
document.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dm/attachments/20160112/1437a9d8/attachment.html>


More information about the dm mailing list