|
|
Línia 24: |
Línia 24: |
| | | |
| </xs:schema> | | </xs:schema> |
|
| |
|
| |
| == XSD Restriccions ==
| |
|
| |
| === Tipus ===
| |
|
| |
| [[Fitxer:Tipus xsd.gif]]
| |
|
| |
| === Llista ===
| |
|
| |
| <xs:simpleType name="rGenere">
| |
| :<xs:restriction base="xs:string">
| |
| ::<xs:enumeration value="comedia"/>
| |
| ::<xs:enumeration value="acció"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
|
| |
| === Digits Màxims ===
| |
|
| |
| <xs:simpleType name="rIsbn">
| |
| :<xs:restriction base="xs:integer">
| |
| ::<xs:totalDigits value="13"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
|
| |
| === Decimals Màxims ===
| |
|
| |
| <xs:simpleType name="rPreu">
| |
| :<xs:restriction base="xs:decimal">
| |
| ::<xs:fractionDigits value="2"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
|
| |
| === Valor minim i màxim===
| |
|
| |
| <xs:simpleType name="rEdat">
| |
| :<xs:restriction base="xs:integer">
| |
| ::<xs:minInclusive value="18"/>
| |
| ::<xs:maxInclusive value="150"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
|
| |
| === Patró d'un string ===
| |
|
| |
| <xs:simpleType name="rDni">
| |
| :<xs:restriction base="xs:string">
| |
| ::<xs:pattern value="[0-9]{8}[A-Z]"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
|
| |
| === Patró Numèric ===
| |
|
| |
| <xs:simpleType name="rTelefon">
| |
| :<xs:restriction base="xs:integer">
| |
| ::<xs:pattern value="[6-9][0-9]{8}"/>
| |
| :</xs:restriction>
| |
| </xs:simpleType>
| |
Revisió del 01:47, 28 nov 2020
Plantilla
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xs:element name="titol" type="xs:string"/>
- <xs:element name="llibre">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="titol" minOccurs="1" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
</xs:schema>