You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fop-intermediate-format-ng-content.xsd 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  18. targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
  19. xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate">
  20. <xs:include schemaLocation="fop-intermediate-format-ng-datatypes.xsd"/>
  21. <xs:complexType name="contentType">
  22. <xs:choice maxOccurs="unbounded" minOccurs="0">
  23. <xs:element name="viewport">
  24. <xs:complexType>
  25. <xs:complexContent>
  26. <xs:extension base="mf:contentType">
  27. <xs:attribute name="transform" type="xs:string"/>
  28. <xs:attributeGroup ref="mf:sizeAtts"/>
  29. <xs:attribute name="clip-rect" type="mf:rectangleType"/>
  30. </xs:extension>
  31. </xs:complexContent>
  32. </xs:complexType>
  33. </xs:element>
  34. <xs:element name="g">
  35. <xs:complexType>
  36. <xs:complexContent>
  37. <xs:extension base="mf:contentType">
  38. <xs:attribute name="transform" type="xs:string"/>
  39. </xs:extension>
  40. </xs:complexContent>
  41. </xs:complexType>
  42. </xs:element>
  43. <xs:element name="id">
  44. <xs:complexType>
  45. <xs:attribute name="name" use="required" type="xs:string"/>
  46. </xs:complexType>
  47. </xs:element>
  48. <xs:element name="font">
  49. <xs:complexType>
  50. <xs:attribute name="family" type="xs:string"/>
  51. <xs:attribute name="style" type="mf:fontStyleType"/>
  52. <xs:attribute name="variant" type="mf:fontVariantType"/>
  53. <xs:attribute name="weight" type="mf:fontWeightType"/>
  54. <xs:attribute name="stretch" type="mf:fontStretchType"/>
  55. <xs:attribute name="size" type="mf:lengthType"/>
  56. <xs:attribute name="color" type="mf:colorType"/>
  57. </xs:complexType>
  58. </xs:element>
  59. <xs:element name="text">
  60. <xs:complexType>
  61. <xs:simpleContent>
  62. <xs:extension base="xs:string">
  63. <xs:attribute name="x" use="required" type="mf:lengthType"/>
  64. <xs:attribute name="y" use="required" type="mf:lengthType"/>
  65. <xs:attribute name="letter-spacing" type="mf:lengthType"/>
  66. <xs:attribute name="word-spacing" type="mf:lengthType"/>
  67. <xs:attribute name="dx" type="mf:lengthListType"/>
  68. <xs:attribute name="dp" type="mf:dpListType"/>
  69. </xs:extension>
  70. </xs:simpleContent>
  71. </xs:complexType>
  72. </xs:element>
  73. <xs:element name="clip-rect">
  74. <xs:complexType>
  75. <xs:attributeGroup ref="mf:rectAtts"/>
  76. </xs:complexType>
  77. </xs:element>
  78. <xs:element name="rect">
  79. <xs:complexType>
  80. <xs:attributeGroup ref="mf:rectAtts"/>
  81. <xs:attributeGroup ref="mf:fillAtts"/>
  82. </xs:complexType>
  83. </xs:element>
  84. <xs:element name="line">
  85. <xs:complexType>
  86. <xs:attribute name="x1" use="required" type="mf:lengthType"/>
  87. <xs:attribute name="y1" use="required" type="mf:lengthType"/>
  88. <xs:attribute name="x2" use="required" type="mf:lengthType"/>
  89. <xs:attribute name="y2" use="required" type="mf:lengthType"/>
  90. <xs:attribute name="color" use="required" type="mf:colorType"/>
  91. <xs:attribute name="stroke-width" use="required" type="mf:lengthType"/>
  92. <xs:attribute name="style" use="required" type="mf:ruleStyle"/>
  93. </xs:complexType>
  94. </xs:element>
  95. <xs:element name="border-rect">
  96. <xs:complexType>
  97. <xs:attributeGroup ref="mf:rectAtts"/>
  98. <xs:attribute name="left" type="mf:borderDef"/>
  99. <xs:attribute name="right" type="mf:borderDef"/>
  100. <xs:attribute name="top" type="mf:borderDef"/>
  101. <xs:attribute name="bottom" type="mf:borderDef"/>
  102. </xs:complexType>
  103. </xs:element>
  104. <xs:element name="image">
  105. <xs:complexType>
  106. <xs:complexContent>
  107. <xs:extension base="xs:anyType">
  108. <!-- Either use element content with any namespace or xlink:href -->
  109. <xs:attributeGroup ref="mf:rectAtts"/>
  110. <xs:attributeGroup ref="mf:foreignAtts"/>
  111. </xs:extension>
  112. </xs:complexContent>
  113. </xs:complexType>
  114. </xs:element>
  115. </xs:choice>
  116. </xs:complexType>
  117. <xs:attributeGroup name="sizeAtts">
  118. <xs:attribute name="width" type="mf:lengthType" use="required"/>
  119. <xs:attribute name="height" type="mf:lengthType" use="required"/>
  120. </xs:attributeGroup>
  121. <xs:attributeGroup name="posAtts">
  122. <xs:attribute name="x" type="mf:lengthType" default="0"/>
  123. <xs:attribute name="y" type="mf:lengthType" default="0"/>
  124. </xs:attributeGroup>
  125. <xs:attributeGroup name="rectAtts">
  126. <xs:attributeGroup ref="mf:posAtts"/>
  127. <xs:attributeGroup ref="mf:sizeAtts"/>
  128. </xs:attributeGroup>
  129. <xs:attributeGroup name="fillAtts">
  130. <xs:attribute name="fill" type="xs:string" default="none"/>
  131. </xs:attributeGroup>
  132. <!--xs:attributeGroup name="fillStrokeAtts">
  133. <xs:attribute name="fill" type="xs:string" default="none"/>
  134. <xs:attribute name="stroke" type="xs:string" default="none"/>
  135. </xs:attributeGroup-->
  136. <xs:attributeGroup name="foreignAtts">
  137. <xs:anyAttribute namespace="##other" processContents="lax"/>
  138. </xs:attributeGroup>
  139. <xs:attribute name="xmlSpace">
  140. <!--
  141. This is a copy of the definition of the xml:space attribute, from the schema for the XML
  142. namespace. That schema can be found at http://www.w3.org/2001/xml.xsd.
  143. Ideally we would want to re-use that schema. However, we don’t want to refer to it using an
  144. import statement is it causes too many connections to the W3C website. Neither can we store a
  145. local copy and ship it with FOP as its license is the W3C Document License and so far we are not
  146. allowed to redistribute files under such a license.
  147. See also https://issues.apache.org/jira/browse/LEGAL-111
  148. -->
  149. <xs:simpleType>
  150. <xs:restriction base="xs:NCName">
  151. <xs:enumeration value="default"/>
  152. <xs:enumeration value="preserve"/>
  153. </xs:restriction>
  154. </xs:simpleType>
  155. </xs:attribute>
  156. </xs:schema>