CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 14:20:18 GMT
content-type: text/html
content-encoding: gzip
last-modified: Thu, 13 Jul 2023 17:44:51 GMT
cache-control: max-age=2592000, public
expires: Mon, 10 Nov 2025 14:20:17 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98ceff537f0f0bc9
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: EXPIRED
set-cookie: __cf_bm=WMPUAySoSTzcFyF1UQSzLJufg7RXGEUhsrYvC6EpPR4-1760192418-1.0.1.1-YjCgmnmi8AtYf3EydeUCkHdTjiyu3PCirIarPI_jj6GPZnlKGE6SYC3Jvj7OYz8U8O3EImYBAd1FbxGAMeXkdC5EZKrjtHqnpfcJeK10JxE; path=/; expires=Sat, 11-Oct-25 14:50:18 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98ceff537f0f0bc9-BLR
alt-svc: h3=":443"; ma=86400
Re: Question on XPath expression from Henry S. Thompson on 2000-05-08 (www-xml-schema-comments@w3.org from April to June 2000)
Re: Question on XPath expression
- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 08 May 2000 14:52:50 +0100
- To: "gmacri@libero.it"<gmacri@libero.it>
- Cc: www-xml-schema-comments@w3.org
- Message-ID: <f5b4s89qhcd.fsf@cogsci.ed.ac.uk>
"gmacri@libero.it"<gmacri@libero.it> writes: > In this example there is a definition of a key: > <xs:element name="car"> > <xs:complexType model="empty"> > . . . > <xs:attribute name="regRef" type="dt:integer"/> > <xs:attribute name="regState" type="twoLetterCode"/> > </xs:complexType> > </xs:element> > </xs:complexType> > > <xs:key name="carRef" > > <xs:selector>.//car[@regRef]</xs:selector> > <xs:field>@regRef</xs:field> > <xs:field>@regState</xs:field> > </xs:keyref> > </xs:element> > > If I want define a key similar to the key defined up, can I use as > content of <field> a name of element that not is descendant of "car" > but is a name of element that is, for instance, the child of an > ancestor of car ?. > Thank you for all. Yes. As the spec. says [1], the things picked out by <field> are not constrained to lie within the element picked out by <selector>, and no other constraint as to locality is imposed. ht [1] https://www.w3.org/TR/xmlschema-1/#Identity-constraint_Definition_details -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: https://www.ltg.ed.ac.uk/~ht/
Received on Monday, 8 May 2000 09:53:00 UTC