XML Schema field Element
❮ การอ้างอิงสคีมา XML ที่สมบูรณ์
ความหมายและการใช้งาน
องค์ประกอบฟิลด์ระบุนิพจน์ XPath ที่ระบุค่าที่ใช้ในการกำหนดข้อจำกัดเอกลักษณ์
ข้อมูลองค์ประกอบ
- องค์ประกอบหลัก:คีย์, keyref, เอกลักษณ์
ไวยากรณ์
<field
id=ID
xpath=XPath expression
any attributes
>
(annotation?)
</field>
(เครื่องหมาย ? ประกาศว่าองค์ประกอบสามารถเกิดขึ้นได้เป็นศูนย์หรือครั้งเดียวภายในองค์ประกอบฟิลด์)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
xpath | Required. Identifies a single element or attribute whose content or value is used for the constraint |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
ตัวอย่าง 1
ตัวอย่างต่อไปนี้แสดงองค์ประกอบฟิลด์ที่ระบุแอตทริบิวต์ "userID" เป็นฟิลด์ที่จะใช้สำหรับข้อจำกัดข้อมูลประจำตัว:
<xs:field xpath="@userID"/>
❮ การอ้างอิงสคีมา XML ที่สมบูรณ์