This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
proiect:specificatii-xsd [2012/10/09 09:41] andrei.maruseac [adjust brightness] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =Specificații xsd= | ||
- | == rotate == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="rotate.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="support,rotate"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Rotate image according to specified parameter"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="dectype"> | ||
- | <xs:restriction base="xs:decimal"/> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | <xs:element name="angle" type="dectype"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == otsu == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | |||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="otsu.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="binarization"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Classic Otsu Algorithm for binarization"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == crop == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="crop.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="support,crop"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Image cropping tool"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="inttype"> | ||
- | <xs:restriction base="xs:positiveInteger"/> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | <xs:element name="top" type="inttype"/> | ||
- | <xs:element name="bottom" type="inttype"/> | ||
- | <xs:element name="left" type="inttype"/> | ||
- | <xs:element name="right" type="inttype"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == deskew == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="deskew.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="deskew"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Automatic deskew computation and/or custom rotation"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == adjust contrast == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="adjust_contrast.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="support,contrast"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Adjust image contrast"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="adjusttype"> | ||
- | <xs:restriction base="xs:integer"> | ||
- | <xs:minInclusive value="-127"/> | ||
- | <xs:maxInclusive value="127"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | <xs:element name="value" type="adjusttype"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == adjust brightness == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="adjust_brightness.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="support,birghtness"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Adjust image brightness"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="adjusttype"> | ||
- | <xs:restriction base="xs:integer"> | ||
- | <xs:minInclusive value="-255"/> | ||
- | <xs:maxInclusive value="255"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | <xs:element name="value" type="adjusttype"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == Tesseract-OCR wrapper == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="tesseract_wrapper.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="ocr"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Extracts characters from text using Tesseract"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="name" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == convert_pdf == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="convert_pdf.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="pdf-exporter"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Creates a pdf file based on the XML files provided as input using mets2pdf"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType" maxOccurs="unbounded"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == layout analysis == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="full_layout.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="layout"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Analyzes layout of image from scratch"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == hierarchy analysis == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:simpleType name="execName"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="mock_hierarchy.exe"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="hierarchy"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="execDescription"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:pattern value="Creates a hierachy out of the blocks resulted from layout analysis"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | | ||
- | <xs:element name="task"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="execInfo" minOccurs="0" maxOccurs="0"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:element name="name" type="execName"/> | ||
- | <xs:element name="type" type="execType"/> | ||
- | <xs:element name="description" type="execDescription"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | |||
- | <xs:element name="inputFile" type="fileType"/> | ||
- | <xs:element name="outputFile" type="fileType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:schema> | ||
- | |||
- | == layout format specification == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:complexType name="DocumentType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
- | <xs:group ref="BlockGroup"/> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="image" type="xs:string" use="required"/> | ||
- | <xs:attribute name="direction" type="DirType" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="DirType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:enumeration value="ascending"/> | ||
- | <xs:enumeration value="descending"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:simpleType name="ImposedType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:enumeration value="page_number"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="fileType"> | ||
- | <xs:attribute name="name" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:group name="BlockGroup"> | ||
- | <xs:choice> | ||
- | <xs:element name="TextBlock" type="TextBlockType"/> | ||
- | <xs:element name="ImageBlock" type="ImageBlockType"/> | ||
- | <xs:element name="ComposedBlock" type="ComposedBlockType"/> | ||
- | </xs:choice> | ||
- | </xs:group> | ||
- | |||
- | <xs:complexType name="PointType"> | ||
- | <xs:attribute name="x" type="xs:positiveInteger"/> | ||
- | <xs:attribute name="y" type="xs:positiveInteger"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="PolygonType"> | ||
- | <xs:sequence minOccurs="3" maxOccurs="unbounded"> | ||
- | <xs:element name="Point" type="PointType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="BlockType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="1"> | ||
- | <xs:element name="Polygon" type="PolygonType"/> | ||
- | </xs:sequence> | ||
- | |||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="ComposedBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:sequence minOccurs="1" maxOccurs="1"> | ||
- | <xs:element name="TextBlock"/> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="type" type="ImposedType" use="required"/> | ||
- | </xs:extension> | ||
- | |||
- | </xs:complexContent> | ||
- | |||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="ImageBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:extension> | ||
- | </xs:complexContent> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="TextBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:sequence minOccurs="0"> | ||
- | <xs:element name="TextLine" maxOccurs="unbounded"> | ||
- | <xs:complexType> | ||
- | <xs:sequence> | ||
- | <xs:sequence maxOccurs="unbounded"> | ||
- | <xs:element name="String" type="xs:string"/> | ||
- | </xs:sequence> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:extension> | ||
- | </xs:complexContent> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="Document" type="DocumentType"/> | ||
- | </xs:schema> | ||
- | |||
- | == Hierarchy format specification == | ||
- | |||
- | <?xml version="1.0" encoding="ISO-8859-1" ?> | ||
- | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
- | <xs:complexType name="hierarchyType"> | ||
- | <xs:sequence minOccurs="1" maxOccurs="1"> | ||
- | <xs:element name="hierarchy_docs" type="hierarchyDocsType"/> | ||
- | <xs:element name="hierarchy_blocks" type="hierarchyBlocksType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="hierarchyBlocksType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
- | <xs:group ref="BlockGroup"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="DirType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:enumeration value="ascending"/> | ||
- | <xs:enumeration value="descending"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:complexType name="documentType"> | ||
- | <xs:attribute name="image" type="xs:string" use="required"/> | ||
- | <xs:attribute name="direction" type="DirType" use="required"/> | ||
- | <xs:attribute name="id" type="xs:string" use="required"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="hierarchyDocsType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
- | <xs:element name="Document" type="documentType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:simpleType name="ImposedType"> | ||
- | <xs:restriction base="xs:string"> | ||
- | <xs:enumeration value="page_number"/> | ||
- | <xs:enumeration value="article"/> | ||
- | <xs:enumeration value="title"/> | ||
- | <xs:enumeration value="subtitle"/> | ||
- | <xs:enumeration value="body"/> | ||
- | <xs:enumeration value="paragraph"/> | ||
- | </xs:restriction> | ||
- | </xs:simpleType> | ||
- | |||
- | <xs:group name="BlockGroup"> | ||
- | <xs:choice> | ||
- | <xs:element name="TextBlock" type="TextBlockType"/> | ||
- | <xs:element name="ImageBlock" type="ImageBlockType"/> | ||
- | <xs:element name="ComposedBlock" type="ComposedBlockType"/> | ||
- | </xs:choice> | ||
- | </xs:group> | ||
- | |||
- | <xs:complexType name="PointType"> | ||
- | <xs:attribute name="x" type="xs:positiveInteger"/> | ||
- | <xs:attribute name="y" type="xs:positiveInteger"/> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="PolygonType"> | ||
- | <xs:sequence minOccurs="3" maxOccurs="unbounded"> | ||
- | <xs:element name="Point" type="PointType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="BlockType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="1"> | ||
- | <xs:element name="Polygon" type="PolygonType"/> | ||
- | </xs:sequence> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="ComposedBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
- | <xs:group ref="BlockGroup"/> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="type" type="ImposedType" use="required"/> | ||
- | </xs:extension> | ||
- | </xs:complexContent> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="ImageBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:attribute name="refid" type="xs:string" use="required"/> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:extension> | ||
- | </xs:complexContent> | ||
- | </xs:complexType> | ||
- | |||
- | <xs:complexType name="TextBlockType"> | ||
- | <xs:complexContent> | ||
- | <xs:extension base="BlockType"> | ||
- | <xs:sequence minOccurs="0"> | ||
- | <xs:element name="TextLine" maxOccurs="unbounded"> | ||
- | <xs:complexType> | ||
- | <xs:sequence maxOccurs="unbounded"> | ||
- | <xs:element name="String" type="xs:string"/> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:complexType> | ||
- | </xs:element> | ||
- | </xs:sequence> | ||
- | <xs:attribute name="refid" type="xs:string" use="required"/> | ||
- | <xs:attribute name="left" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="right" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="top" type="xs:positiveInteger" use="required"/> | ||
- | <xs:attribute name="bottom" type="xs:positiveInteger" use="required"/> | ||
- | </xs:extension> | ||
- | </xs:complexContent> | ||
- | |||
- | </xs:complexType> | ||
- | |||
- | <xs:element name="hierarchy" type="hierarchyType"/> | ||
- | </xs:schema> |