Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <root1 stuff="Hello World&#x09;!" />
  3.  
  4. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  5. <xs:simpleType name="Hello">
  6. <xs:restriction base="xs:string">
  7. <xs:pattern value="Hello World&#x09;!"/>
  8. </xs:restriction>
  9. </xs:simpleType>
  10. <xs:element name="root1">
  11. <xs:complexType>
  12. <xs:attribute name="stuff" type="Hello" />
  13. </xs:complexType>
  14. </xs:element>
  15. </xs:schema>
  16.  
  17. <xs:simpleType name="HellUnion">
  18. <xs:union memberTypes="Hello" />
  19. </xs:simpleType>
  20. <xs:element name="root2">
  21. <xs:complexType>
  22. <xs:attribute name="stuff" type="HellUnion" />
  23. </xs:complexType>
  24. </xs:element>
  25.  
  26. <?xml version="1.0" encoding="UTF-8" ?>
  27. <root2 stuff="Hello World&#x09;!" />
  28.  
  29. <xs:simpleType name="Hello">
  30. <xs:restriction base="xs:string">
  31. <xs:whiteSpace value="preserve"/>
  32. <xs:pattern value="Hello World&#x09;!"/>
  33. </xs:restriction>
  34. </xs:simpleType>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement