12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE schema [
- <!ENTITY ncname "\i\c*">
- <!ENTITY qname "(&ncname;:)?&ncname;">
- <!ENTITY aname "@&qname;">
- <!ENTITY pos "\[\d+\]">
- <!ENTITY attr "\[&aname;='(.)*'\]|\[&aname;="(.)*"\]">
- <!ENTITY valueq "\[(&qname;|\.)="(.)*"\]">
- <!ENTITY value "\[(&qname;|\.)='(.)*'\]|&valueq;">
- <!ENTITY cond "&attr;|&value;|&pos;">
- <!ENTITY step "(&qname;|\*)(&cond;)*">
- <!ENTITY piq "processing-instruction\(("&ncname;")\)">
- <!ENTITY pi "processing-instruction\(('&ncname;')?\)|&piq;">
- <!ENTITY id "id\(('&ncname;')?\)|id\(("&ncname;")?\)">
- <!ENTITY com "comment\(\)">
- <!ENTITY text "text\(\)">
- <!ENTITY nspa "namespace::&ncname;">
- <!ENTITY cnodes "(&text;(&pos;)?)|(&com;(&pos;)?)|((π)(&pos;)?)">
- <!ENTITY child "&cnodes;|&step;">
- <!ENTITY last "(&child;|&aname;|&nspa;)">
- ]>
- <xsd:schema
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified">
- <xsd:simpleType name="xpath">
- <xsd:restriction base="xsd:string">
- <xsd:pattern
- value="(/)?((&id;)((/&step;)*(/&last;))?|(&step;/)*(&last;))"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="xpath-add">
- <xsd:restriction base="xsd:string">
- <xsd:pattern
- value="(/)?((&id;)((/&step;)*(/&child;))?|(&step;/)*(&child;))"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="pos">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="before"/>
- <xsd:enumeration value="after"/>
- <xsd:enumeration value="prepend"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="type">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="&aname;|&nspa;"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="add">
- <xsd:complexContent mixed="true">
- <xsd:restriction base="xsd:anyType">
- <xsd:sequence>
- <xsd:any processContents="lax" namespace="##any"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="sel" type="xpath-add"
- use="required"/>
- <xsd:attribute name="pos" type="pos"/>
- <xsd:attribute name="type" type="type"/>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:complexType name="replace">
- <xsd:complexContent mixed="true">
- <xsd:restriction base="xsd:anyType">
- <xsd:sequence>
- <xsd:any processContents="lax" namespace="##any"
- minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="sel" type="xpath" use="required"/>
- </xsd:restriction>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:simpleType name="ws">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="before"/>
- <xsd:enumeration value="after"/>
- <xsd:enumeration value="both"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="remove">
- <xsd:attribute name="sel" type="xpath" use="required"/>
- <xsd:attribute name="ws" type="ws"/>
- </xsd:complexType>
- </xsd:schema>
|