Esquema de ficheros de informes
Función: Formato de informes
Extensión de fichero: .kut
Directorio: reports

<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!--Definicion de tipos especiales--> <xs:simpleType name="pageSize">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="30"/>
    <!--PageSize:
		 0 - A4,
		 1 - B5,
		 2 - Letter,
		 3 - Legal,
		 4 - Executive,
		 5 - A0,
		 6 - A1,
		 7 - A2,
		 8 - A3,
		 9 - A5,
		10 - A6,
		11 - A7,
		12 - A8,
		13 - A9,
		14 - B0,
		15 - B1,
		16 - B10,
		17 - B2,
		18 - B3,
		19 - B4,
		20 - B6,
		21 - B7,
		22 - B8,
		23 - B9,
		24 - C5E,
		25 - Comm10E,
		26 - DLE,
		27 - Folio,
		28 - Ledger,
		29 - Tabloid,
		30 - NPageSize-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="pageOrientation">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="1"/>
    <!--PageOrientation:
		 0 - Portrait,
		 1 - Landscape-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="printFrequency">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="2"/>
    <!--PrintFrequency:
		0 - FirstPage,
		1 - EveryPage,
		2 - LastPage-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="color">

  <xs:restriction base="xs:string">
    <!--xs:pattern value="[0-255,[0-255],[0-255]"/-->
    <!--color in R,G,B format-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="borderStyle">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="5"/>
    <!--BorderStyle:
		0 - NoPen,
		1 - SolidLine,
		2 - DashLine,
		3 - DotLine,
		4 - DashDotLine,
		5 - DashDotDotLine-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="fontWeight">

  <xs:restriction base="xs:integer">
    <!--xs:enumeration value="25"/>
    <xs:enumeration value="50"/>
    <xs:enumeration value="63"/>
    <xs:enumeration value="75"/>
    <xs:enumeration value="87"/>
    <xs:enumeration value="70"/>
    <xs:enumeration value="100"/-->
    <!--FontWeight:
		25 - Light,
		50 - Normal,
		63 - DemiBold,
		75 - Bold
		87 - Black
		70 - ???
		100 - ???-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="hAlignment">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="2"/>
    <!--!HAlignment:
		0 - Left,
		1 - Center,
		2 - Right-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="vAlignment">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="2"/>
    <!--!VAlignment:
		0 - Top,
		1 - Middle,
		2 - Bottom-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="dataType">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="6"/>
    <!--DataType:
		0 - String,
		1 - Integer,
		2 - Float
		3 - Date,
		4 - Currency
		5 - Pixmap
		6 - CodBar
		7 - Bool-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="dateFormat">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="11"/>
    <!--DateFormat:
		 0 - MDY_SLASH,
		 1 - MDY_DASH,
		 2 - MMDDY_SLASH,
		 3 - MMDDY_DASH,
		 4 - MDYYYY_SLASH,
		 5 - MDYYYY_DASH,
		 6 - MMDDYYYY_SLASH,
		 7 - MMDDYYYY_DASH,
		 8 - YYYYMD_SLASH,
		 9 - YYYYMD_DASH,
		10 - DDMMYY_PERIOD,
		11 - DDMMYYYY_PERIOD,
		12 - DMY_SLASH,
		13 - DMY_DASH,
		14 - DDMMY_SLASH,
		15 - DDMMY_DASH,
 		16 - DMYYYY_SLASH,
		17 - DMYYYY_DASH,
		18 - DDMMYYYY_SLASH,
		19 - DDMMYYYY_DASH,
		20 - DD,
		21 - MM,
		22 - Month,
		23 - YYYY,
		24 - YY,
                25 - Y-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="specialType">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="1"/>
    <!--Type:
		0 - Date,
		1 - PageNumber-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="calculationType">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="5"/>
    <!--CalculationType:
		0 - Count,
		1 - Sum,
		2 - Average,
		3 - Variance,
		4 - StandardDeviation
		5 - NoOperation
		6 - CallFunction-->
  </xs:restriction>

</xs:simpleType>

<xs:simpleType name="lineStyle">

  <xs:restriction base="xs:integer">
    <xs:maxInclusive value="5"/>
    <!--Style:
		0 - NoPen,
		1 - SolidLine,
		2 - DashLine,
		3 - DotLine,
		4 - DashDotLine,
		5 - DashDotDotLine-->
  </xs:restriction>

</xs:simpleType>

<!-- Definicion de atributos-->

  <xs:attribute name="PageSize" type="pageSize"/>
  <xs:attribute name="PageOrientation" type="pageOrientation"/>
  <xs:attribute name="TopMargin" type="xs:integer"/>
  <xs:attribute name="BottomMargin" type="xs:integer"/>
  <xs:attribute name="LeftMargin" type="xs:integer"/>
  <xs:attribute name="RightMargin" type="xs:integer"/>

  <xs:attribute name="Height" type="xs:integer"/>
  <xs:attribute name="PrintFrequency" type="printFrequency"/>

  <xs:attribute name="Level" type="xs:integer"/>
  <xs:attribute name="NewPage" type="xs:string"/>

  <xs:attribute name="Text" type="xs:string"/>
  <xs:attribute name="X" type="xs:integer"/>
  <xs:attribute name="Y" type="xs:integer"/>
  <xs:attribute name="Width" type="xs:string"/>
  <xs:attribute name="BackgroundColor" type="color"/>
  <xs:attribute name="ForegroundColor" type="color"/>
  <xs:attribute name="BorderColor" type="color"/>
  <xs:attribute name="BorderWidth" type="xs:integer"/>
  <xs:attribute name="BorderStyle" type="borderStyle"/>
  <xs:attribute name="FontFamily" type="xs:string"/>
  <xs:attribute name="FontSize" type="xs:integer"/>
  <xs:attribute name="FontWeight" type="fontWeight"/>
  <xs:attribute name="FontItalic" type="xs:boolean"/>
  <xs:attribute name="!HAlignment" type="hAlignment"/>
  <xs:attribute name="!VAlignment" type="vAlignment"/>
  <xs:attribute name="WordWrap" type="xs:boolean"/>

  <xs:attribute name="Field" type="xs:string"/>
  <xs:attribute name="DataType" type="dataType"/>
  <xs:attribute name="DateFormat" type="dateFormat"/>
  <xs:attribute name="Precision" type="xs:integer"/>
  <xs:attribute name="Currency" type="xs:integer"/>
  <xs:attribute name="NegValueColor" type="color"/>
  <xs:attribute name="CommaSeparator" type="xs:integer"/>
  <xs:attribute name="CodBarType" type="xs:string"/>

  <xs:attribute name="Type" type="specialType"/>

  <xs:attribute name="CalculationType" type="calculationType"/>

  <xs:attribute name="X1" type="xs:integer"/>
  <xs:attribute name="Y1" type="xs:integer"/>
  <xs:attribute name="X2" type="xs:integer"/>
  <xs:attribute name="Y2" type="xs:integer"/>
  <xs:attribute name="Color" type="color"/>
  <xs:attribute name="Style" type="lineStyle"/>

<!-- Definicion de grupos de atributos--> <xs:attributeGroup name="KugarTemplateAttributes">

  <xs:attribute ref="PageSize"/>
  <xs:attribute ref="PageOrientation"/>
  <xs:attribute ref="TopMargin"/>
  <xs:attribute ref="BottomMargin"/>
  <xs:attribute ref="LeftMargin"/>
  <xs:attribute ref="RightMargin"/>

</xs:attributeGroup>

<xs:attributeGroup name="LabelAttributes">

  <xs:attribute ref="Text"/>
  <xs:attribute ref="X"/>
  <xs:attribute ref="Y"/>
  <xs:attribute ref="Width"/>
  <xs:attribute ref="Height"/>
  <xs:attribute ref="BackgroundColor"/>
  <xs:attribute ref="ForegroundColor"/>
  <xs:attribute ref="BorderColor"/>
  <xs:attribute ref="BorderWidth"/>
  <xs:attribute ref="BorderStyle"/>
  <xs:attribute ref="FontFamily"/>
  <xs:attribute ref="FontSize"/>
  <xs:attribute ref="FontWeight"/>
  <xs:attribute ref="FontItalic"/>
  <xs:attribute ref="!HAlignment"/>
  <xs:attribute ref="!VAlignment"/>
  <xs:attribute ref="WordWrap"/>

</xs:attributeGroup>

<xs:attributeGroup name="FieldAttributes">

  <xs:attributeGroup ref="LabelAttributes"/>
  <xs:attribute ref="Field"/>
  <xs:attribute ref="DataType"/>
  <xs:attribute ref="DateFormat"/>
  <xs:attribute ref="Precision"/>
  <xs:attribute ref="Currency"/>
  <xs:attribute ref="NegValueColor"/>
  <xs:attribute ref="CommaSeparator"/>

</xs:attributeGroup>

<xs:attributeGroup name="SpecialAttributes">

  <xs:attributeGroup ref="LabelAttributes"/>
  <xs:attribute ref="Type"/>
  <xs:attribute ref="DateFormat"/>

</xs:attributeGroup>

<xs:attributeGroup name="CalculatedFieldAttributes">

  <xs:attribute ref="CalculationType"/>
  <xs:attributeGroup ref="FieldAttributes"/>

</xs:attributeGroup>

<xs:attributeGroup name="HeaderFootAttributes">

  <xs:attribute ref="Height"/>
  <xs:attribute ref="PrintFrequency"/>

</xs:attributeGroup>

<xs:attributeGroup name="DetailAttributes">

  <xs:attribute ref="Height"/>
  <xs:attribute ref="Level"/>

</xs:attributeGroup>

<xs:attributeGroup name="LineAttributes">

  <xs:attribute ref="X1"/>
  <xs:attribute ref="X2"/>
  <xs:attribute ref="Y1"/>
  <xs:attribute ref="Y2"/>
  <xs:attribute ref="Width"/>
  <xs:attribute ref="Color"/>
  <xs:attribute ref="Style"/>

</xs:attributeGroup>

<!-- Definicion de grupos de elementos--> <xs:group name="HeaderAndFootElements">

    <xs:sequence>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="Label" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="Special" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="Line" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
  </xs:sequence>

</xs:group>

<xs:group name="DetailElements">

    <xs:all>
      <xs:element ref="Label" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="Special" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="Line" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="Field" minOccurs="0" maxOccurs="unbounded"/>
    </xs:all>

</xs:group>

<!-- Definicion de tipos complejos--> <xs:complexType name="HeaderAndFootType">

  <!--xs:group ref="HeaderAndFootElements"/-->
   <xs:sequence>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="Label"/>
      <xs:element ref="Special"/>
      <xs:element ref="Line"/>
    </xs:choice>
  </xs:sequence>
  <xs:attributeGroup ref="HeaderFootAttributes"/>

</xs:complexType>

<!-- Definicion de elementos--> <xs:element name="DetailHeader">

  <xs:complexType>
    <xs:group ref="HeaderAndFootElements"/>
    <xs:attributeGroup ref="DetailAttributes"/>
  </xs:complexType>

</xs:element>

<xs:element name="Detail">

  <xs:complexType>
    <!--xs:group ref="DetailElements"/-->
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="Label"/>
        <xs:element ref="Special"/>
        <xs:element ref="Line"/>
        <xs:element ref="Field"/>
      </xs:choice>
    </xs:sequence>
    <xs:attributeGroup ref="DetailAttributes"/>
  </xs:complexType>

</xs:element>

<xs:element name="DetailFooter">

  <xs:complexType>
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="Label"/>
        <xs:element ref="Special"/>
        <xs:element ref="Line"/>
	<xs:element ref="CalculatedField"/>
      </xs:choice>
    </xs:sequence>
    <!--xs:group ref="HeaderAndFootElements"/-->
    <xs:attributeGroup ref="DetailAttributes"/>
    <xs:attribute ref="NewPage"/>
  </xs:complexType>

</xs:element>

<xs:element name="Label">

  <xs:complexType>
    <xs:attributeGroup ref="LabelAttributes"/>
  </xs:complexType>

</xs:element>

<xs:element name="Field">

  <xs:complexType>
    <xs:attributeGroup ref="FieldAttributes"/>
    <xs:attribute ref="CodBarType"/>
  </xs:complexType>

</xs:element>

<xs:element name="Special">

  <xs:complexType>
    <xs:attributeGroup ref="SpecialAttributes"/>
  </xs:complexType>

</xs:element>

<xs:element name="CalculatedField">

  <xs:complexType>
    <xs:attributeGroup ref="CalculatedFieldAttributes"/>
  </xs:complexType>

</xs:element>

<xs:element name="Line">

  <xs:complexType>
    <xs:attributeGroup ref="LineAttributes"/>
  </xs:complexType>

</xs:element>

<!--Definicion del elemento principal-->

  <xs:element name="KugarTemplate">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="ReportHeader" type="HeaderAndFootType" minOccurs="0"/>
        <xs:element name="PageHeader" type="HeaderAndFootType" minOccurs="0"/>

        <xs:element ref="DetailHeader" minOccurs="0"/>
        <xs:element ref="Detail" maxOccurs="unbounded"/>
        <xs:element ref="DetailFooter" minOccurs="0"/>

        <xs:element name="PageFooter" type="HeaderAndFootType" minOccurs="0"/>
        <xs:element name="ReportFooter" type="HeaderAndFootType" minOccurs="0"/>
      </xs:sequence>
      <xs:attributeGroup ref="KugarTemplateAttributes"/>
    </xs:complexType>
  </xs:element>

</xs:schema>