Re: questions about attribute declarations

> A minor point, if we're serious about leaping ahead:  How about
> exapnding the syntax of NUMBER a bit, so that at least negative
> numbers are OK, and arguably decimals as well.  It's always seemed odd
> to me that these are not included, and it regularly gets in my way.

Is this in scope?  If so...

* you would need to handle decimals like
	30 000 000,512
  or
	30.000.000,512
  or
	30 000,000·512 (that's a raised dot)

* is .3 allowed?  How about -.2e-.1 (in FORTRAN-style EXP notation)?

I'd rather see NUMBER left as it is in SGML, dropped from XML, and
replaced with something like a simplified HyLex:
    <!AttList Person
	Salary /^[$£][0-9]+(\.[0-9][0-9])?/ #REQUIRED
    >

(the 8-bit character is a pound-sterling, perhaps I should've used an entity!)

This doesn't cover multilingual documents, but at least it doesn't wire a
single number representation into a standard either.

This could eaily be extended to content:

    <!Element postCode - -
	(/^[A-Z][A-Z]+[0-9]?( [0-9]+[A-Z]+)?$/)
    >

    <!Element CAPITALS - -
	(/[:upper:]/|smalls)*
    >

    <Element smalls
	(/[:lower:]/|CAPITALS)*
    >

where /.../ is like PCDATA except matching the given regexp.

For conversion to SGML, you'd replace /.../ with PCDATA for an element
and with CDATA for an attribute.  That's a down-conversion, of course,
although you could also add HyLex expressions I suppose....

Lee

Received on Tuesday, 24 September 1996 20:56:33 UTC