xml/prodlužovač.xsd
author František Kučera <franta-hg@frantovo.cz>
Sat, 12 Nov 2011 17:02:44 +0100
changeset 3 ba0753e26d53
parent 1 723c08da16f6
permissions -rw-r--r--
Volitelná hlavička User-Agent + obrázek v XSL (jako base64).
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <xs:schema	xmlns="https://trac.frantovo.cz/prodluzovac-odkazu/wiki/xmlns/konfigurace"
     3             targetNamespace="https://trac.frantovo.cz/prodluzovac-odkazu/wiki/xmlns/konfigurace"
     4 			xmlns:xs="http://www.w3.org/2001/XMLSchema"
     5             elementFormDefault="qualified"
     6             attributeFormDefault="unqualified">
     7 
     8 	<xs:element name="prodlužovač" type="konfigurace" />
     9 	
    10 	<xs:complexType name="konfigurace">		
    11 		<xs:all>
    12 			<xs:element name="limitPřesměrování" type="xs:positiveInteger">
    13 				<xs:annotation>
    14 					<xs:documentation>Maximální počet přesměrování, která se pokusíme následovat.</xs:documentation>
    15 				</xs:annotation>
    16 			</xs:element>
    17 			<xs:element name="zkracovače" type="zkracovače">
    18 				<xs:annotation>
    19 					<xs:documentation>Seznam podporovaných zkracovačů</xs:documentation>
    20 				</xs:annotation>
    21 			</xs:element>
    22 			<xs:element name="tvářitSeJakoProhlížeč" type="xs:string" minOccurs="0">
    23 				<xs:annotation>
    24 					<xs:documentation>
    25 						Pokud je tento element přístupný, budeme v HTTP požadavcích posílat
    26 						hlavičku „User-Agent“ a tvářit se, že jsme daný prohlížeč.
    27 						Příklad: „Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1“
    28 					</xs:documentation>
    29 				</xs:annotation>
    30 			</xs:element>
    31 		</xs:all>
    32 	</xs:complexType>
    33 	
    34 	<xs:complexType name="zkracovače">		
    35 		<xs:sequence minOccurs="1" maxOccurs="unbounded">
    36 			<xs:element name="url" type="url">
    37 				<xs:annotation>
    38 					<xs:documentation>
    39 						Regulární výraz definující URL daného zkracovače.
    40 						Slouží k tomu, abychom nemuseli testovat (což znamená DNS+HTTP požadavek) 
    41 						všechna URL, ale jen ta, u kterých lze očekávat přesměrování jinam.
    42 					</xs:documentation>
    43 				</xs:annotation>
    44 			</xs:element>
    45 		</xs:sequence>	
    46 	</xs:complexType>
    47 	
    48 	<xs:complexType name="url">
    49 		<xs:simpleContent>
    50 			<xs:extension base="xs:string">
    51 				<xs:attribute name="popis" type="xs:string">
    52 					<xs:annotation>
    53 						<xs:documentation>Volitelný popis (nemá vliv na funkčnost).</xs:documentation>
    54 					</xs:annotation>
    55 				</xs:attribute>
    56 				<xs:attribute name="záležíNaVelikosti" type="xs:boolean" default="false">
    57 					<xs:annotation>
    58 						<xs:documentation>
    59 							Zda musí URL vyhovovat výrazu přesně – včetně velikosti písmen.
    60 							Při neuvedení tohoto atributu nemusí – takže bude vyhovovat např.
    61 								jak „http://example.com/index.xhtml“,
    62 								tak i „http://EXAMPLE.COM/index.xhtml“.
    63 						</xs:documentation>
    64 					</xs:annotation>
    65 				</xs:attribute>
    66 			</xs:extension>
    67 		</xs:simpleContent>		
    68 	</xs:complexType>
    69 
    70 </xs:schema>