aboutsummaryrefslogtreecommitdiffstats
path: root/fop/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-nav.xsd
blob: 49851f30234005e88dca7ddfc3f7d0f870d3b443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id$ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    targetNamespace="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"
    xmlns:nav="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"
    xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
  
  <xs:import schemaLocation="fop-intermediate-format-ng-datatypes.xsd"
    namespace="http://xmlgraphics.apache.org/fop/intermediate"/>
  
  <xs:element name="bookmark-tree">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="unbounded">
        <xs:element ref="nav:bookmark"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="bookmark">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="nav:actionType">
          <xs:sequence>
            <xs:element ref="nav:bookmark" maxOccurs="unbounded" minOccurs="0"/>
          </xs:sequence>
          <xs:attribute name="title" type="xs:string"/>
          <xs:attribute name="starting-state">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="show"/>
                <xs:enumeration value="hide"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <!-- Not yet implemented:
          <xs:attribute name="color" type="if:colorType"/>
          <xs:attribute name="font-style">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="normal"/>
                <xs:enumeration value="italic"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="font-weight">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="normal"/>
                <xs:enumeration value="bold"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          -->
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="link">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="nav:actionType">
          <xs:attribute name="rect" type="if:rectangleType"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="actionType">
    <xs:choice>
      <xs:element ref="nav:goto-uri"/>
      <xs:element ref="nav:goto-xy"/>
    </xs:choice>
  </xs:complexType>
  <xs:element name="goto-uri">
    <xs:complexType>
      <xs:attributeGroup ref="nav:idAtts"/>
      <xs:attribute name="uri" type="xs:anyURI" use="required"/>
      <xs:attribute name="show-destination" use="optional" default="replace">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="new"/>
            <xs:enumeration value="replace"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="goto-xy">
    <xs:complexType>
      <xs:attributeGroup ref="nav:refDef"/>
      <xs:attribute name="page-index" type="xs:int"/>
      <xs:attribute name="page-index-relative" type="xs:int" use="optional"/>
      <xs:attributeGroup ref="nav:posAtts"/>
    </xs:complexType>
  </xs:element>
  
  <xs:attributeGroup name="posAtts">
    <xs:attribute name="x" type="if:lengthType" default="0"/>
    <xs:attribute name="y" type="if:lengthType" default="0"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="idAtts">
    <xs:attribute name="id" type="xs:NCName"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="refDef">
    <xs:attributeGroup ref="nav:idAtts"/>
    <xs:attribute name="idref" type="xs:NCName"/>
  </xs:attributeGroup>
</xs:schema>