CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 04:49:35 GMT
content-type: text/html
content-encoding: gzip
content-location: 0372.html
vary: negotiate,Accept-Encoding
tcn: choice
last-modified: Thu, 13 Jul 2023 17:44:51 GMT
cache-control: max-age=2592000, public
expires: Sun, 09 Nov 2025 06:58:05 GMT
access-control-allow-origin: *
x-request-id: 989c187148fabe08
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: HIT
set-cookie: __cf_bm=ATEY3SNIPs9_CSBdJehoFmuoMUrM0LqzSy0DtY.Jfe8-1760158175-1.0.1.1-cBErCny6guX454pO3qwZoHKkIVnbkZP9q5umrA1qXvoslunFXGBkgIpiqxA20l0qyk6sMqHPslbhw.XW78GYLMyoIU.j0Qan_1WJdBH.Ov0; path=/; expires=Sat, 11-Oct-25 05:19:35 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98cbbb51af2ce9c3-BLR
alt-svc: h3=":443"; ma=86400
LC-136: symbolic constants from Arnold, Curt on 2000-06-21 (www-xml-schema-comments@w3.org from April to June 2000)
LC-136: symbolic constants
- From: Arnold, Curt <Curt.Arnold@hyprotech.com>
- Date: Wed, 21 Jun 2000 12:52:54 -0600
- To: "'Steven.Goldfarb@cern.ch'" <Steven.Goldfarb@cern.ch>, "'olken@lbl.gov'" <olken@lbl.gov>, "'marting@develop.com'" <marting@develop.com>
- Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
- Message-ID: <B2C1451A181BD411B88A00E018C1C19C08A683@THOR>
Re: https://www.w3.org/2000/05/12-xmlschema-lcissues.xml#constants I think the actual resolution of the symbolic constants is outside what you could expect from a generic XML processor, however a resolution of LC-2 conjunction types (https://www.w3.org/2000/05/12-xmlschema-lcissues.xml#conjunction-types) and/or open enumerations (https://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0022.html and https://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0023.html) might enable the behavior that you desire. For example, using conjunction types: <xsd:schema ...> <xsd:simpleType name="length" base="double"> <xsd:annotation> <xsd:documentation>Length in meters</xsd:documentation> </xsd:annotation> </xsd:simpleType> <xsd:simpleType name="expression" base="string"> <xsd:pattern value="$.*"/> </xsd:simpleType> <xsd:simpleType name="lengthExpr" base="string"> <xsd:or> <xsd:conform type="myschema:length"/> <xsd:comform base="myschema:expression"/> </xsd:or> </xsd:simpleType> <xsd:element name="box"> <xsd:complexType> <xsd:attribute name="X" type="myschema:lengthExpr"/> </xsd:compleType> ... </xsd:element> ... </xsd:schema> This would allow the X attribute of box to be either a double interpreted as length in meters or a string starting with a $ that would be interpreted as an expression that would have to be resolved by the application. Open enumerations (which is referenced in LC-191 and I think is worthy of its own issue number with or without the substitution feature mentioned here) would allow you to have the equivalent of schema defined symbolic constants. Not quite what you example was doing, but similar. For example: <xsd:schema ...> <xsd:simpleType name="length" base="double"> <xsd:enumeration open="true"> <xsd:literal value="1000">1Km</xsd:literal> </xsd:enumeration> </xsd:simpleType> ... </xsd:schema> This would allow the length datatype to accept any legal double and in addition if the value matched any listed literal, the value would be substituted.
Received on Wednesday, 21 June 2000 15:06:30 UTC