/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
1
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
 <xsd:include schemaLocation="types.xsd"/>
322 by Suren A. Chilingaryan
Support multiple XML files per folder
3
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
4
 <xsd:element name="model">
5
    <xsd:complexType>
322 by Suren A. Chilingaryan
Support multiple XML files per folder
6
      <xsd:choice minOccurs="1" maxOccurs="unbounded">
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
7
        <xsd:element name="bank" type="pcilib_bank_t" minOccurs="0" maxOccurs="unbounded" />
8
        <xsd:element name="transform" type="pcilib_transform_view_t" minOccurs="0" maxOccurs="unbounded" />
9
        <xsd:element name="enum" type="pcilib_enum_view_t" minOccurs="0" maxOccurs="unbounded">
10
            <xsd:key name="pcilib_value_name_key">
11
                <xsd:selector xpath="name" />
12
                <xsd:field xpath="@value" />
13
            </xsd:key>
14
        </xsd:element>
15
        <xsd:element name="unit" type="pcilib_unit_t" minOccurs="0" maxOccurs="unbounded">
16
            <xsd:key name="pcilib_unit_transform_key">
17
                <xsd:selector xpath="transform" />
18
                <xsd:field xpath="@unit" />
19
            </xsd:key>
20
        </xsd:element>
21
      </xsd:choice>
22
    </xsd:complexType>
23
24
    <xsd:key name="pcilib_bank_key">
25
      <xsd:selector xpath="bank" />
26
      <xsd:field xpath="@name" />
27
    </xsd:key>
322 by Suren A. Chilingaryan
Support multiple XML files per folder
28
<!-- Currently, we define all registers, banks, views, and units as xsd:ID which prevents them from sharing name anyway.
29
Currently it seems fine, but later it could turn out too be to strict. Then, we get problem also here as transform[@name]
30
is ID of view, not register. But how can we restrict transform field to @register only? -->
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
31
    <xsd:key name="pcilib_register_key">
322 by Suren A. Chilingaryan
Support multiple XML files per folder
32
      <xsd:selector xpath="bank/register|bank/register/field|transform" />
33
      <xsd:field xpath="@name|@register" />
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
34
    </xsd:key>
35
    <xsd:key name="pcilib_view_key">
36
      <xsd:selector xpath="transform|enum" />
322 by Suren A. Chilingaryan
Support multiple XML files per folder
37
      <xsd:field xpath="@name|@path" />
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
38
    </xsd:key>
39
    <xsd:key name="pcilib_unit_key">
40
      <xsd:selector xpath="unit" />
41
      <xsd:field xpath="@name" />
42
    </xsd:key>
43
44
    <xsd:keyref name="pcilib_register_view_ref" refer="pcilib_view_key">
45
      <xsd:selector xpath="bank/register/view|bank/register/field/view" />
46
      <xsd:field xpath="@view" />
47
    </xsd:keyref>
322 by Suren A. Chilingaryan
Support multiple XML files per folder
48
<!-- Actually, it is no problem to reference non-existing unit just for informative purposes
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
49
    <xsd:keyref name="pcilib_unit_ref" refer="pcilib_unit_key">
50
      <xsd:selector xpath="transform|enum" />
51
      <xsd:field xpath="@unit" />
52
    </xsd:keyref>
322 by Suren A. Chilingaryan
Support multiple XML files per folder
53
-->
307 by Suren A. Chilingaryan
Finalyze XML support and provide initial support for views (only descriptions so far)
54
 </xsd:element>
55
</xsd:schema>