Changes for page Technical-reference
Last modified by Rasmus Enekvist on 2022/03/10 08:07
From empty
To version 27.1
edited by David Persson
on 2020/06/26 01:22
on 2020/06/26 01:22
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 4 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +Technical-reference - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.Contract-financing.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 - XWiki.XWikiGuest1 +xwiki:XWiki.dap - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +px-custom-page-content - Content
-
... ... @@ -1,0 +1,13 @@ 1 += Introduction = 2 + 3 +(% class="jumbotron" %) 4 +((( 5 +(% class="container" %) 6 +((( 7 +The technical reference section covers file references and record descriptions for Contract financing service. 8 +))) 9 +))) 10 + 11 +== Contract financing service through CustomerContract and ContractBilling file format == 12 + 13 +Access file reference, record descriptions and ...
- ContractBilling_[1.X].xsd
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
-
... ... @@ -1,0 +1,338 @@ 1 +<?xml version="1.0" encoding="utf-8"?> 2 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 3 + <xs:element name="ContractBilling"> 4 + <xs:complexType> 5 + <xs:sequence> 6 + <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="unbounded"> 7 + <xs:complexType> 8 + <xs:sequence> 9 + <xs:element name="CustomerNo" type="Identifier15" nillable="false" minOccurs="1" maxOccurs="1"> 10 + <xs:annotation> 11 + <xs:documentation>Unique identifier of customer, Customer number</xs:documentation> 12 + </xs:annotation> 13 + </xs:element> 14 + <xs:element name="BillingInfo" minOccurs="0" maxOccurs="1"> 15 + <xs:complexType> 16 + <xs:sequence> 17 + <xs:element name="PaymentInfo" minOccurs="0" maxOccurs="1"> 18 + <xs:complexType> 19 + <xs:choice> 20 + <xs:element name="Clear" minOccurs="0" maxOccurs="1" > 21 + <xs:annotation> 22 + <xs:documentation>Erases previously set payment info on customer</xs:documentation> 23 + </xs:annotation> 24 + </xs:element> 25 + <xs:element name="Set" minOccurs="0" maxOccurs="1"> 26 + <xs:annotation> 27 + <xs:documentation>Sets differing payment info on customer, fully replaces earlier settings</xs:documentation> 28 + </xs:annotation> 29 + <xs:complexType> 30 + <xs:sequence> 31 + <xs:element name="RecurringCardInfo" type="Card" minOccurs="1" maxOccurs="1"> 32 + <xs:annotation> 33 + <xs:documentation>Info about token and expiry date</xs:documentation> 34 + </xs:annotation> 35 + </xs:element> 36 + </xs:sequence> 37 + </xs:complexType> 38 + </xs:element> 39 + </xs:choice> 40 + </xs:complexType> 41 + </xs:element> 42 + </xs:sequence> 43 + </xs:complexType> 44 + </xs:element> 45 + <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="1"> 46 + <xs:complexType> 47 + <xs:sequence> 48 + <xs:element name="Name" type="NameAddressString72" minOccurs="1" maxOccurs="1"/> 49 + <xs:element name="RegNo" type="RegNo" minOccurs="1" maxOccurs="1"> 50 + <xs:annotation> 51 + <xs:documentation>Customer Social Security No</xs:documentation> 52 + </xs:annotation> 53 + </xs:element> 54 + <xs:element name="LegalAddressInfo" minOccurs="1" maxOccurs="1"> 55 + <xs:complexType> 56 + <xs:sequence> 57 + <xs:element name="LegalAddress" type="Address" minOccurs="1" maxOccurs="1"/> 58 + <xs:element name="E-MailAddress" type="Email" minOccurs="0" maxOccurs="1"/> 59 + <xs:element name="Cellphone" type="String15" minOccurs="0" maxOccurs="1"/> 60 + </xs:sequence> 61 + </xs:complexType> 62 + </xs:element> 63 + </xs:sequence> 64 + <xs:attribute name="LegalEntity" type="LegalEntity" use="optional"/> 65 + </xs:complexType> 66 + </xs:element> 67 + <xs:element name="BillingAddress" type="Address" minOccurs="0" maxOccurs="1"/> 68 + <xs:element name="BillInfo" minOccurs="0" maxOccurs="unbounded"> 69 + <xs:complexType> 70 + <xs:sequence> 71 + <xs:element name="ContractId" type="xs:unsignedInt" nillable="false" minOccurs="1" maxOccurs="1"> 72 + <xs:annotation> 73 + <xs:documentation>Unique identifier of each contract in the ledger</xs:documentation> 74 + </xs:annotation> 75 + </xs:element> 76 + <xs:element name="ReferenceInfo" type="ReferenceInfo" minOccurs="1" maxOccurs="1"/> 77 + <xs:element name="VatInfo" type="VatInfo" minOccurs="0" maxOccurs="5"> 78 + <xs:annotation> 79 + <xs:documentation>Aggregated amount per VATRate</xs:documentation> 80 + </xs:annotation> 81 + </xs:element> 82 + <xs:element name="Product" minOccurs="1" maxOccurs="unbounded"> 83 + <xs:complexType> 84 + <xs:sequence> 85 + <xs:element name="AmountInclVat" type="Amount" minOccurs="1" maxOccurs="1"/> 86 + <xs:element name="ProductDescription" type="String90" nillable="false" minOccurs="1" maxOccurs="1"> 87 + <xs:annotation> 88 + <xs:documentation>Textual description of the product</xs:documentation> 89 + </xs:annotation> 90 + </xs:element> 91 + <xs:element name="BillingPeriod" type="String35" minOccurs="0" maxOccurs="1"> 92 + <xs:annotation> 93 + <xs:documentation>Product billing period</xs:documentation> 94 + </xs:annotation> 95 + </xs:element> 96 + </xs:sequence> 97 + </xs:complexType> 98 + </xs:element> 99 + </xs:sequence> 100 + </xs:complexType> 101 + </xs:element> 102 + </xs:sequence> 103 + </xs:complexType> 104 + </xs:element> 105 + </xs:sequence> 106 + <xs:attribute name="Version" type="Version" use="required"> 107 + <xs:annotation> 108 + <xs:documentation>Versions supported by this schema</xs:documentation> 109 + </xs:annotation> 110 + </xs:attribute> 111 + <xs:attribute name="CreatedDateTime" type="xs:dateTime" use="required"> 112 + <xs:annotation> 113 + <xs:documentation>Date and time when the file was created</xs:documentation> 114 + </xs:annotation> 115 + </xs:attribute> 116 + <xs:attribute name="CompanyNo" type="CompanyNumber" use="required"/> 117 + <xs:attribute name="CompanyName" type="xs:string" use="required"/> 118 + </xs:complexType> 119 + </xs:element> 120 + <xs:simpleType name="Money"> 121 + <xs:restriction base="xs:decimal"> 122 + <xs:fractionDigits value="2"/> 123 + <xs:minInclusive value="-100000000"/> 124 + <xs:maxInclusive value="100000000"/> 125 + </xs:restriction> 126 + </xs:simpleType> 127 + <xs:complexType name="Amount"> 128 + <xs:sequence> 129 + <xs:element name="AmountInclVat" type="Money" nillable="false" minOccurs="1" maxOccurs="1"/> 130 + </xs:sequence> 131 + <xs:attribute name="Currency" type="eCurrencyType" use="required"/> 132 + </xs:complexType> 133 + <xs:complexType name="Card"> 134 + <xs:sequence> 135 + <xs:element name="CardReference" type="String50" minOccurs="1" maxOccurs="1"/> 136 + <xs:element name="ExpiryDate" type="PXExpiryDate" minOccurs="1" maxOccurs="1"/> 137 + </xs:sequence> 138 + </xs:complexType> 139 + <xs:simpleType name="PXExpiryDate"> 140 + <xs:restriction base="xs:string"> 141 + <xs:length value="5"/> 142 + <xs:pattern value="(0[1-9]|1[012])/(\d{2})"/> 143 + </xs:restriction> 144 + </xs:simpleType> 145 + <xs:simpleType name="Version"> 146 + <xs:restriction base="xs:string"> 147 + <xs:enumeration value="1.0"> 148 + <xs:annotation> 149 + <xs:documentation>Original version</xs:documentation> 150 + </xs:annotation> 151 + </xs:enumeration> 152 + <xs:enumeration value="1.1"> 153 + <xs:annotation> 154 + <xs:documentation>PaymentInfo</xs:documentation> 155 + </xs:annotation> 156 + </xs:enumeration> 157 + </xs:restriction> 158 + </xs:simpleType> 159 + <xs:simpleType name="eCurrencyType"> 160 + <xs:restriction base="xs:string"> 161 + <xs:enumeration value="SEK"/> 162 + <xs:enumeration value="NOK"/> 163 + <xs:enumeration value="DKK"/> 164 + <xs:enumeration value="EUR"/> 165 + </xs:restriction> 166 + </xs:simpleType> 167 + <xs:simpleType name="Identifier15"> 168 + <xs:restriction base="xs:string"> 169 + <xs:minLength value="1"/> 170 + <xs:maxLength value="15"/> 171 + <xs:pattern value="[a-zA-Z0-9\-]*"/> 172 + </xs:restriction> 173 + </xs:simpleType> 174 + <xs:simpleType name="ISO3166"> 175 + <xs:restriction base="xs:string"> 176 + <xs:minLength value="2"/> 177 + <xs:maxLength value="2"/> 178 + <xs:pattern value="[A-Z]*"/> 179 + </xs:restriction> 180 + </xs:simpleType> 181 + <xs:simpleType name="CompanyNumber"> 182 + <xs:restriction base="xs:string"> 183 + <xs:minLength value="1"/> 184 + <xs:maxLength value="15"/> 185 + <xs:pattern value="[0-9]*"/> 186 + </xs:restriction> 187 + </xs:simpleType> 188 + <xs:simpleType name="String35"> 189 + <xs:restriction base="PXString"> 190 + <xs:maxLength value="35"/> 191 + </xs:restriction> 192 + </xs:simpleType> 193 + <xs:simpleType name="String90"> 194 + <xs:restriction base="PXString"> 195 + <xs:minLength value="1"/> 196 + <xs:maxLength value="90"/> 197 + </xs:restriction> 198 + </xs:simpleType> 199 + <xs:simpleType name="Email"> 200 + <xs:restriction base="PXString"> 201 + <xs:maxLength value="60"/> 202 + <xs:pattern value="[^@]+@[^\.]+\..+"/> 203 + </xs:restriction> 204 + </xs:simpleType> 205 + <xs:simpleType name="String15"> 206 + <xs:restriction base="PXString"> 207 + <xs:maxLength value="15"/> 208 + </xs:restriction> 209 + </xs:simpleType> 210 + <xs:simpleType name="ZipCode"> 211 + <xs:restriction base="xs:string"> 212 + <xs:maxLength value="9"/> 213 + <xs:pattern value="[A-Z0-9\-]+"/> 214 + </xs:restriction> 215 + </xs:simpleType> 216 + <xs:simpleType name="String50"> 217 + <xs:restriction base="PXString"> 218 + <xs:minLength value="1"/> 219 + <xs:maxLength value="50"/> 220 + </xs:restriction> 221 + </xs:simpleType> 222 + <xs:simpleType name="VatRate"> 223 + <xs:restriction base="xs:decimal"> 224 + <xs:enumeration value="0.00"/> 225 + <xs:enumeration value="6.00"/> 226 + <xs:enumeration value="8.00"/> 227 + <xs:enumeration value="12.00"/> 228 + <xs:enumeration value="13.00"/> 229 + <xs:enumeration value="14.00"/> 230 + <xs:enumeration value="22.00"/> 231 + <xs:enumeration value="23.00"/> 232 + <xs:enumeration value="24.00"/> 233 + <xs:enumeration value="25.00"/> 234 + </xs:restriction> 235 + </xs:simpleType> 236 + <xs:simpleType name="String20"> 237 + <xs:restriction base="PXString"> 238 + <xs:maxLength value="20"/> 239 + </xs:restriction> 240 + </xs:simpleType> 241 + <xs:simpleType name="NameAddressString35"> 242 + <xs:restriction base="PXNameAddressString"> 243 + <xs:minLength value="1"/> 244 + <xs:maxLength value="35"/> 245 + </xs:restriction> 246 + </xs:simpleType> 247 + <xs:simpleType name="NameAddressString36"> 248 + <xs:restriction base="PXNameAddressString"> 249 + <xs:minLength value="1"/> 250 + <xs:maxLength value="36"/> 251 + </xs:restriction> 252 + </xs:simpleType> 253 + <xs:simpleType name="NameAddressString27"> 254 + <xs:restriction base="PXNameAddressString"> 255 + <xs:minLength value="1"/> 256 + <xs:maxLength value="27"/> 257 + </xs:restriction> 258 + </xs:simpleType> 259 + <xs:simpleType name="PXString"> 260 + <xs:restriction base="xs:string"> 261 + <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-ú&]*"/> 262 + </xs:restriction> 263 + </xs:simpleType> 264 + <xs:simpleType name="PXNameAddressString"> 265 + <xs:restriction base="xs:string"> 266 + <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-úü&]*"/> 267 + </xs:restriction> 268 + </xs:simpleType> 269 + <xs:simpleType name="String74"> 270 + <xs:restriction base="xs:string"> 271 + <xs:maxLength value="74"/> 272 + </xs:restriction> 273 + </xs:simpleType> 274 + <xs:complexType name="ReferenceInfo"> 275 + <xs:sequence> 276 + <xs:element name="ExternalBillId" type="String20" nillable="false" minOccurs="1" maxOccurs="1"/> 277 + </xs:sequence> 278 + </xs:complexType> 279 + <xs:complexType name="RegNo"> 280 + <xs:simpleContent> 281 + <xs:extension base="String15"> 282 + <xs:attribute name="CountryCode" type="ISO3166"/> 283 + </xs:extension> 284 + </xs:simpleContent> 285 + </xs:complexType> 286 + <xs:simpleType name="LegalEntity"> 287 + <xs:restriction base="xs:string"> 288 + <xs:enumeration value="Private"/> 289 + </xs:restriction> 290 + </xs:simpleType> 291 + <xs:complexType name="VatInfo"> 292 + <xs:sequence> 293 + <xs:element name="Amount" type="Amount" minOccurs="1" maxOccurs="1"/> 294 + <xs:element name="VatAmount" type="Money" minOccurs="1" maxOccurs="1"/> 295 + <xs:element name="VatRate" type="VatRate" minOccurs="1" maxOccurs="1"/> 296 + </xs:sequence> 297 + </xs:complexType> 298 + <xs:simpleType name="NameAddressString72"> 299 + <xs:restriction base="PXNameAddressString"> 300 + <xs:minLength value="1"/> 301 + <xs:maxLength value="72"/> 302 + </xs:restriction> 303 + </xs:simpleType> 304 + <xs:complexType name="Address"> 305 + <xs:sequence> 306 + <xs:element name="Addressee" type="NameAddressString72" minOccurs="1" maxOccurs="1"> 307 + <xs:annotation> 308 + <xs:documentation>Full name of addressee</xs:documentation> 309 + </xs:annotation> 310 + </xs:element> 311 + <xs:element name="StreetAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1"> 312 + <xs:annotation> 313 + <xs:documentation>Street address</xs:documentation> 314 + </xs:annotation> 315 + </xs:element> 316 + <xs:element name="ZipCode" type="ZipCode" nillable="false" minOccurs="1" maxOccurs="1"> 317 + <xs:annotation> 318 + <xs:documentation>Zipcode conforming to country standard</xs:documentation> 319 + </xs:annotation> 320 + </xs:element> 321 + <xs:element name="City" type="NameAddressString27" nillable="false" minOccurs="1" maxOccurs="1"> 322 + <xs:annotation> 323 + <xs:documentation>City</xs:documentation> 324 + </xs:annotation> 325 + </xs:element> 326 + <xs:element name="CoAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1"> 327 + <xs:annotation> 328 + <xs:documentation>Care of address</xs:documentation> 329 + </xs:annotation> 330 + </xs:element> 331 + <xs:element name="CountryCode" type="ISO3166" minOccurs="1" maxOccurs="1"> 332 + <xs:annotation> 333 + <xs:documentation>Country code according to ISO 3166</xs:documentation> 334 + </xs:annotation> 335 + </xs:element> 336 + </xs:sequence> 337 + </xs:complexType> 338 +</xs:schema>
- CustomerContract_[1.X].xsd
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
-
... ... @@ -1,0 +1,305 @@ 1 +<?xml version="1.0" encoding="utf-8"?> 2 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 3 + <xs:element name="CustomerContract"> 4 + <xs:complexType> 5 + <xs:sequence> 6 + <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="unbounded"> 7 + <xs:complexType> 8 + <xs:sequence> 9 + <xs:element name="CustomerNo" type="Identifier15" nillable="false" minOccurs="1" maxOccurs="1"/> 10 + <xs:element name="CustomerInfo" minOccurs="1" maxOccurs="1"> 11 + <xs:complexType> 12 + <xs:sequence> 13 + <xs:element name="Name" type="NameAddressString72" minOccurs="1" maxOccurs="1"/> 14 + <xs:element name="RegNo" type="RegNo" minOccurs="1" maxOccurs="1"/> 15 + <xs:element name="AddressInfo" minOccurs="1" maxOccurs="1"> 16 + <xs:complexType> 17 + <xs:sequence> 18 + <xs:element name="LegalAddress" type="Address" minOccurs="1" maxOccurs="1"/> 19 + <xs:element name="E-MailAddress" type="Email" minOccurs="0" maxOccurs="1"/> 20 + <xs:element name="Cellphone" type="String15" minOccurs="0" maxOccurs="1"/> 21 + </xs:sequence> 22 + </xs:complexType> 23 + </xs:element> 24 + <xs:element name="CustomerContracts" minOccurs="1" maxOccurs="1"> 25 + <xs:complexType> 26 + <xs:sequence> 27 + <xs:element name="NewContract" type="NewContract" minOccurs="0" maxOccurs="unbounded"/> 28 + <xs:element name="ExtendContract" type="ExtendContract" minOccurs="0" maxOccurs="unbounded"/> 29 + <xs:element name="CreditContract" type="CreditContract" minOccurs="0" maxOccurs="unbounded"/> 30 + </xs:sequence> 31 + </xs:complexType> 32 + </xs:element> 33 + </xs:sequence> 34 + <xs:attribute name="LegalEntity" type="LegalEntity" use="optional"/> 35 + </xs:complexType> 36 + </xs:element> 37 + </xs:sequence> 38 + </xs:complexType> 39 + </xs:element> 40 + </xs:sequence> 41 + <xs:attribute name="Version" type="Version" use="required"> 42 + <xs:annotation> 43 + <xs:documentation>Versions supported by this schema</xs:documentation> 44 + </xs:annotation> 45 + </xs:attribute> 46 + <xs:attribute name="CreatedDateTime" type="xs:dateTime" use="required"> 47 + <xs:annotation> 48 + <xs:documentation>Date and time when the file was created</xs:documentation> 49 + </xs:annotation> 50 + </xs:attribute> 51 + <xs:attribute name="CompanyNo" type="CompanyNumber" use="required"/> 52 + <xs:attribute name="CompanyName" type="xs:string" use="required"/> 53 + </xs:complexType> 54 + </xs:element> 55 + <xs:simpleType name="Money"> 56 + <xs:restriction base="xs:decimal"> 57 + <xs:fractionDigits value="2"/> 58 + <xs:minInclusive value="0.01"/> 59 + <xs:maxInclusive value="100000"/> 60 + </xs:restriction> 61 + </xs:simpleType> 62 + <xs:complexType name="Amount"> 63 + <xs:sequence> 64 + <xs:element name="AmountInclVat" type="Money" nillable="false" minOccurs="1" maxOccurs="1"/> 65 + </xs:sequence> 66 + <xs:attribute name="Currency" type="eCurrencyType" use="required"/> 67 + </xs:complexType> 68 + <xs:complexType name="NewContract"> 69 + <xs:sequence> 70 + <xs:element name="ContractTransactionInfo" type="ContractTransactionInfo" nillable="false" minOccurs="1" maxOccurs="1"> 71 + <xs:annotation> 72 + <xs:documentation>Reference, identifyer etc. for the contracttransaction</xs:documentation> 73 + </xs:annotation> 74 + </xs:element> 75 + <xs:element name="Amount" type="Amount" nillable="false" minOccurs="1" maxOccurs="1"/> 76 + <xs:element name="ContractExpectedEndDate" type="xs:date" nillable="false" minOccurs="1" maxOccurs="1"> 77 + <xs:annotation> 78 + <xs:documentation>Expected duration of the contract</xs:documentation> 79 + </xs:annotation> 80 + </xs:element> 81 + <xs:element name="CreditCheckReference" type="String50" nillable="false" minOccurs="1" maxOccurs="1"> 82 + <xs:annotation> 83 + <xs:documentation>Reference to creditcheck decision</xs:documentation> 84 + </xs:annotation> 85 + </xs:element> 86 + </xs:sequence> 87 + </xs:complexType> 88 + <xs:complexType name="ExtendContract"> 89 + <xs:sequence> 90 + <xs:element name="ContractTransactionInfo" type="ContractTransactionInfo" nillable="false" minOccurs="1" maxOccurs="1"> 91 + <xs:annotation> 92 + <xs:documentation>Reference, identifyer etc. for the contracttransaction</xs:documentation> 93 + </xs:annotation> 94 + </xs:element> 95 + <xs:element name="Amount" type="Amount" nillable="false" minOccurs="1" maxOccurs="1"> 96 + <xs:annotation> 97 + <xs:documentation>Amount to extend contract with</xs:documentation> 98 + </xs:annotation> 99 + </xs:element> 100 + <xs:element name="ContractExpectedEndDate" type="xs:date" nillable="false" minOccurs="1" maxOccurs="1"> 101 + <xs:annotation> 102 + <xs:documentation>Expected duration of the contract</xs:documentation> 103 + </xs:annotation> 104 + </xs:element> 105 + <xs:element name="CreditCheckReference" type="String50" nillable="false" minOccurs="1" maxOccurs="1"> 106 + <xs:annotation> 107 + <xs:documentation>Reference to creditcheck decision</xs:documentation> 108 + </xs:annotation> 109 + </xs:element> 110 + </xs:sequence> 111 + </xs:complexType> 112 + <xs:complexType name="CreditContract"> 113 + <xs:sequence> 114 + <xs:element name="ContractTransactionInfo" type="ContractTransactionInfo" nillable="false" minOccurs="1" maxOccurs="1"> 115 + <xs:annotation> 116 + <xs:documentation>Reference, identifyer etc. for the contracttransaction</xs:documentation> 117 + </xs:annotation> 118 + </xs:element> 119 + <xs:element name="Amount" type="Amount" nillable="false" minOccurs="1" maxOccurs="1"/> 120 + </xs:sequence> 121 + </xs:complexType> 122 + <xs:complexType name="ContractTransactionInfo"> 123 + <xs:sequence> 124 + <xs:element name="ContractId" type="xs:unsignedInt" nillable="false" minOccurs="1" maxOccurs="1"> 125 + <xs:annotation> 126 + <xs:documentation>Unique identifier of each contract in the ledger</xs:documentation> 127 + </xs:annotation> 128 + </xs:element> 129 + <xs:element name="TransactionDate" type="xs:date" nillable="false" minOccurs="1" maxOccurs="1"> 130 + <xs:annotation> 131 + <xs:documentation>Date of the contract, contract extend or when the credit was issued depending of the type of transaction</xs:documentation> 132 + </xs:annotation> 133 + </xs:element> 134 + <xs:element name="TransactionId" type="String50" nillable="false" minOccurs="1" maxOccurs="1"> 135 + <xs:annotation> 136 + <xs:documentation>Unique identifier of all types of transactions (NewContract/ExtendContract/CreditTransaction) in the ledger</xs:documentation> 137 + </xs:annotation> 138 + </xs:element> 139 + </xs:sequence> 140 + </xs:complexType> 141 + <xs:simpleType name="Version"> 142 + <xs:restriction base="xs:string"> 143 + <xs:enumeration value="1.0"> 144 + <xs:annotation> 145 + <xs:documentation>Original version</xs:documentation> 146 + </xs:annotation> 147 + </xs:enumeration> 148 + </xs:restriction> 149 + </xs:simpleType> 150 + <xs:simpleType name="eCurrencyType"> 151 + <xs:restriction base="xs:string"> 152 + <xs:enumeration value="SEK"/> 153 + <xs:enumeration value="NOK"/> 154 + <xs:enumeration value="DKK"/> 155 + <xs:enumeration value="EUR"/> 156 + </xs:restriction> 157 + </xs:simpleType> 158 + <xs:simpleType name="Identifier15"> 159 + <xs:restriction base="xs:string"> 160 + <xs:minLength value="1"/> 161 + <xs:maxLength value="15"/> 162 + <xs:pattern value="[a-zA-Z0-9\-]*"/> 163 + </xs:restriction> 164 + </xs:simpleType> 165 + <xs:simpleType name="ISO3166"> 166 + <xs:restriction base="xs:string"> 167 + <xs:minLength value="2"/> 168 + <xs:maxLength value="2"/> 169 + <xs:pattern value="[A-Z]*"/> 170 + </xs:restriction> 171 + </xs:simpleType> 172 + <xs:simpleType name="CompanyNumber"> 173 + <xs:restriction base="xs:string"> 174 + <xs:minLength value="1"/> 175 + <xs:maxLength value="15"/> 176 + <xs:pattern value="[0-9]*"/> 177 + </xs:restriction> 178 + </xs:simpleType> 179 + <xs:simpleType name="String35"> 180 + <xs:restriction base="PXString"> 181 + <xs:maxLength value="35"/> 182 + </xs:restriction> 183 + </xs:simpleType> 184 + <xs:simpleType name="Email"> 185 + <xs:restriction base="PXString"> 186 + <xs:maxLength value="60"/> 187 + <xs:pattern value="[^@]+@[^\.]+\..+"/> 188 + </xs:restriction> 189 + </xs:simpleType> 190 + <xs:simpleType name="String15"> 191 + <xs:restriction base="PXString"> 192 + <xs:maxLength value="15"/> 193 + </xs:restriction> 194 + </xs:simpleType> 195 + <xs:simpleType name="ZipCode"> 196 + <xs:restriction base="xs:string"> 197 + <xs:maxLength value="9"/> 198 + <xs:pattern value="[A-Z0-9\-]+"/> 199 + </xs:restriction> 200 + </xs:simpleType> 201 + <xs:simpleType name="String50"> 202 + <xs:restriction base="PXString"> 203 + <xs:minLength value="1"/> 204 + <xs:maxLength value="50"/> 205 + </xs:restriction> 206 + </xs:simpleType> 207 + <xs:simpleType name="String90"> 208 + <xs:restriction base="PXString"> 209 + <xs:minLength value="1"/> 210 + <xs:maxLength value="90"/> 211 + </xs:restriction> 212 + </xs:simpleType> 213 + <xs:simpleType name="String20"> 214 + <xs:restriction base="PXString"> 215 + <xs:maxLength value="20"/> 216 + </xs:restriction> 217 + </xs:simpleType> 218 + <xs:simpleType name="NameAddressString35"> 219 + <xs:restriction base="PXNameAddressString"> 220 + <xs:minLength value="1"/> 221 + <xs:maxLength value="35"/> 222 + </xs:restriction> 223 + </xs:simpleType> 224 + <xs:simpleType name="NameAddressString36"> 225 + <xs:restriction base="PXNameAddressString"> 226 + <xs:minLength value="1"/> 227 + <xs:maxLength value="36"/> 228 + </xs:restriction> 229 + </xs:simpleType> 230 + <xs:simpleType name="NameAddressString27"> 231 + <xs:restriction base="PXNameAddressString"> 232 + <xs:minLength value="1"/> 233 + <xs:maxLength value="27"/> 234 + </xs:restriction> 235 + </xs:simpleType> 236 + <xs:simpleType name="PXString"> 237 + <xs:restriction base="xs:string"> 238 + <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-ú&]*" /> 239 + <xs:minLength value="1" /> 240 + </xs:restriction> 241 + </xs:simpleType> 242 + <xs:simpleType name="PXNameAddressString"> 243 + <xs:restriction base="xs:string"> 244 + <xs:pattern value="[a-zA-Z0-9_:!;"#<>=?\[\]@{}´ %'-0À-ÖØ-öø-úü&]*" /> 245 + </xs:restriction> 246 + </xs:simpleType> 247 + <xs:complexType name="RegNo"> 248 + <xs:simpleContent> 249 + <xs:extension base="String15"> 250 + <xs:attribute name="CountryCode" type="ISO3166"/> 251 + </xs:extension> 252 + </xs:simpleContent> 253 + </xs:complexType> 254 + <xs:simpleType name="LegalEntity"> 255 + <xs:restriction base="xs:string"> 256 + <xs:enumeration value="Private"/> 257 + </xs:restriction> 258 + </xs:simpleType> 259 + <xs:simpleType name="PXExpiryDate"> 260 + <xs:restriction base="xs:string"> 261 + <xs:length value="5"/> 262 + <xs:pattern value="(0[1-9]|1[012])/(\d{2})"/> 263 + </xs:restriction> 264 + </xs:simpleType> 265 + <xs:simpleType name="NameAddressString72"> 266 + <xs:restriction base="PXNameAddressString"> 267 + <xs:minLength value="1"/> 268 + <xs:maxLength value="72"/> 269 + </xs:restriction> 270 + </xs:simpleType> 271 + <xs:complexType name="Address"> 272 + <xs:sequence> 273 + <xs:element name="Addressee" type="NameAddressString72" minOccurs="1" maxOccurs="1"> 274 + <xs:annotation> 275 + <xs:documentation>Full name of addressee</xs:documentation> 276 + </xs:annotation> 277 + </xs:element> 278 + <xs:element name="StreetAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1"> 279 + <xs:annotation> 280 + <xs:documentation>Street address</xs:documentation> 281 + </xs:annotation> 282 + </xs:element> 283 + <xs:element name="ZipCode" type="ZipCode" nillable="false" minOccurs="1" maxOccurs="1"> 284 + <xs:annotation> 285 + <xs:documentation>Zipcode conforming to country standard</xs:documentation> 286 + </xs:annotation> 287 + </xs:element> 288 + <xs:element name="City" type="NameAddressString27" nillable="false" minOccurs="1" maxOccurs="1"> 289 + <xs:annotation> 290 + <xs:documentation>City</xs:documentation> 291 + </xs:annotation> 292 + </xs:element> 293 + <xs:element name="CoAddress" type="NameAddressString35" nillable="false" minOccurs="0" maxOccurs="1"> 294 + <xs:annotation> 295 + <xs:documentation>Care of address</xs:documentation> 296 + </xs:annotation> 297 + </xs:element> 298 + <xs:element name="CountryCode" type="ISO3166" minOccurs="1" maxOccurs="1"> 299 + <xs:annotation> 300 + <xs:documentation>Country code according to ISO 3166</xs:documentation> 301 + </xs:annotation> 302 + </xs:element> 303 + </xs:sequence> 304 + </xs:complexType> 305 +</xs:schema>
- FileResponse_[1.X].xsd
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
-
... ... @@ -1,0 +1,44 @@ 1 +<?xml version="1.0" encoding="Windows-1252"?> 2 +<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> 3 + <xsd:element name="Response"> 4 + <xsd:complexType> 5 + <xsd:sequence> 6 + <xsd:element name="OriginItems" minOccurs="0" maxOccurs="1"> 7 + <xsd:complexType> 8 + <xsd:sequence> 9 + <xsd:any processContents="skip" minOccurs="1" maxOccurs="unbounded"/> 10 + </xsd:sequence> 11 + </xsd:complexType> 12 + </xsd:element> 13 + <xsd:element name="ResponseItems" minOccurs="1" maxOccurs="1"> 14 + <xsd:complexType> 15 + <xsd:sequence> 16 + <xsd:element name="ResponseItem" type="ResponseItem" maxOccurs="unbounded" /> 17 + </xsd:sequence> 18 + </xsd:complexType> 19 + </xsd:element> 20 + <xsd:element name="ProcessedFile" type="xsd:string" minOccurs="1" nillable="false"/> 21 + </xsd:sequence> 22 + <xs:attribute name="Version" use="required" type="xs:string" fixed="1.0" /> 23 + <xs:attribute name="CreatedDateTime" use="required" type="xs:dateTime" /> 24 + <xs:attribute name="CompanyNo" use="required" type="xs:string" /> 25 + <xs:attribute name="CompanyName" use="required" type="xs:string" /> 26 + </xsd:complexType> 27 + </xsd:element> 28 + <xsd:complexType name="ResponseItem"> 29 + <xsd:sequence> 30 + <xsd:element name="MessageCode" type="xsd:unsignedInt" minOccurs="1" nillable="false"/> 31 + <xsd:element name="Message" type="xsd:string" minOccurs="1" nillable="false"/> 32 + <xsd:element name="ResponseType" type="xsd:string" minOccurs="1" nillable="false"/> 33 + <xsd:element name="Reference"> 34 + <xsd:complexType> 35 + <xsd:simpleContent> 36 + <xsd:extension base="xsd:string"> 37 + <xsd:attribute name="ReferenceType" type="xsd:string" use="required" /> 38 + </xsd:extension> 39 + </xsd:simpleContent> 40 + </xsd:complexType> 41 + </xsd:element> 42 + </xsd:sequence> 43 + </xsd:complexType> 44 +</xs:schema>
- viewXSD.xsl
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
-
... ... @@ -1,0 +1,996 @@ 1 +<!DOCTYPE xsl:stylesheet [ 2 +<!--* 3 +<!DOCTYPE xsl:stylesheet PUBLIC 'http://www.w3.org/1999/XSL/Transform' 4 + '../../People/cmsmcq/lib/xslt10.dtd' [ 5 +*--> 6 +<!ATTLIST xsl:stylesheet 7 + xmlns:xsl CDATA "http://www.w3.org/1999/XSL/Transform" 8 + xmlns:xsd CDATA #IMPLIED 9 + xmlns:xhtml CDATA #IMPLIED 10 +> 11 +<!ATTLIST xsl:text 12 + xmlns:xsl CDATA "http://www.w3.org/1999/XSL/Transform" 13 +> 14 + 15 +<!ENTITY copy "©" ><!--=copyright sign--> 16 +<!ENTITY reg "®" ><!--/circledR =registered sign--> 17 +<!ENTITY rarr "→" ><!--/rightarrow /to A: =rightward arrow--> 18 + 19 +<!ENTITY nl "
"> 20 +<!ENTITY lsquo "‘" ><!--=single quotation mark, left--> 21 +<!ENTITY rsquo "’" ><!--=single quotation mark, right--> 22 +<!ENTITY ldquo "“" ><!--=double quotation mark, left--> 23 +<!ENTITY rdquo "”" ><!--=double quotation mark, right--> 24 + 25 +]> 26 +<xsl:stylesheet version="1.0" 27 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 28 + xmlns:xsd="http://www.w3.org/2001/XMLSchema" 29 + xmlns:xhtml="http://www.w3.org/1999/xhtml" 30 +> 31 + 32 + <!--* xsd.xsl: format an XSD schema document for simple display in a Web browser. 33 + * http://www.w3.org/XML/2004/xml-schema-test-suite/xsd.xsl 34 + * 35 + * Copyright © 2008-2009 World Wide Web Consortium, (Massachusetts 36 + * Institute of Technology, European Research Consortium for 37 + * Informatics and Mathematics, Keio University). All Rights 38 + * Reserved. This work is distributed under the W3C® Software 39 + * License [1] in the hope that it will be useful, but WITHOUT ANY 40 + * WARRANTY; without even the implied warranty of MERCHANTABILITY or 41 + * FITNESS FOR A PARTICULAR PURPOSE. 42 + * 43 + * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 44 + * 45 + *--> 46 + 47 + <!--* Revisions: 48 + * 2012-05-03 : CMSMcQ : reissue under Software License, not document 49 + * license 50 + * 2009-01-21 : CMSMcQ : wrap start-tags only when necessary 51 + * 2009-01-20 : CMSMcQ : wrap start-tags 52 + * 2008-12-19 : CMSMcQ : add toc for schema documents with more than 53 + * five children of xsd:schema 54 + * 2008-12-18 : CMSMcQ : fix problems with text breaking 55 + * add rule for top-level attribute groups 56 + * 2008-09-27 : CMSMcQ : made first version of this stylesheet 57 + *--> 58 + 59 + <xsl:output method="html" indent="yes"/> 60 + 61 + <xsl:param name="line-wrap-length" select="60"/> 62 + <xsl:param name="ind-depth" select="5"/> 63 + <xsl:param name="additional-indent" select="substring( 64 + ' ', 65 + 1,$ind-depth)"/> 66 + 67 + <xsl:variable name="tns"> 68 + <xsl:value-of select="/xsd:schema/@targetNamespace"/> 69 + </xsl:variable> 70 + 71 + <!--* 0 Document root *--> 72 + <xsl:template match="*"> 73 + <xsl:variable name="doctitle"> 74 + <xsl:text>Schema document for </xsl:text> 75 + <xsl:choose> 76 + <xsl:when test="xsd:schema/@targetNamespace"> 77 + <xsl:text>namespace </xsl:text> 78 + <xsl:value-of select="$tns"/> 79 + </xsl:when> 80 + <xsl:otherwise> 81 + <xsl:text>unspecified namespace</xsl:text> 82 + </xsl:otherwise> 83 + </xsl:choose> 84 + </xsl:variable> 85 +<!--Hämtar en överskrift på utifrån första kommentaren i xsd-dokumentet, en förutsättning är att den kommentaren är taggad som en H1--> 86 + <xsl:variable name="docHasHeading" select=" 87 + xsd:schema/xsd:annotation[1]/xsd:documentation/*[1] 88 + [self::xhtml:h1 or self::h1] 89 + or 90 + xsd:schema/xsd:annotation[1]/xsd:documentation/xhtml:div/*[1] 91 + [self::xhtml:h1 or self::h1] 92 + "/> 93 + <xsl:variable name="docIsProlific" select=" 94 + count(xsd:schema/child::*) > 5 95 + "/> 96 + 97 + <xsl:element name="html"> 98 + <xsl:element name="head"> 99 + <xsl:element name="title"> 100 + <xsl:value-of select="$doctitle"/> 101 + </xsl:element> 102 + <xsl:element name="style"> 103 + <xsl:attribute name="type">text/css</xsl:attribute> 104 + .bodytext .bodytext { 105 + margin-left: 0; 106 + margin-right: 0; 107 + } 108 + .bodytext { 109 + margin-left: 15%; 110 + margin-right: 2%; 111 + } 112 + .annotation { 113 + <!--* anything special to do here? *--> 114 + color: navy; 115 + font: bold; 116 + } 117 + .same-ns { 118 + color: Green; 119 + } 120 + .diff-ns { 121 + color: maroon; 122 + } 123 + .warning { 124 + color: red; 125 + } 126 + p.note { 127 + font-style: italic; 128 + } 129 + p.dt { 130 + font-weight: bold; 131 + } 132 + span.rfc { 133 + font-variant: small-caps; 134 + } 135 + </xsl:element> 136 + </xsl:element> 137 + <xsl:element name="body"> 138 + 139 + <xsl:choose> 140 + <xsl:when test="$docHasHeading and not($docIsProlific)"> 141 + <!--* If the first thing in the first documentation element is a heading, 142 + * and there are few children, then don't interfere. 143 + *--> 144 + <xsl:comment>* <xsl:value-of select="$doctitle"/> *</xsl:comment> 145 + </xsl:when> 146 + <xsl:otherwise> 147 + <!--* either document has no heading (and needs one), or 148 + * we're going to do a toc and need a heading anyway 149 + *--> 150 + <xsl:element name="h1"> 151 + <xsl:value-of select="$doctitle"/> 152 + </xsl:element> 153 + <xsl:if test="$docIsProlific"> 154 + <xsl:element name="div"> 155 + <xsl:element name="hr"/> 156 + <xsl:element name="ul"> 157 + <xsl:attribute name="class">bodytext</xsl:attribute> 158 + <xsl:apply-templates mode="toc" select="./xsd:schema/*"/> 159 + </xsl:element> 160 + <xsl:element name="hr"/> 161 + </xsl:element> 162 + </xsl:if> 163 + </xsl:otherwise> 164 + </xsl:choose> 165 + <xsl:apply-templates/> 166 + </xsl:element> 167 + </xsl:element> 168 + </xsl:template> 169 + 170 + <!--* 2 Schema element *--> 171 + <xsl:template match="xsd:schema"> 172 + <!--* optional future change: write out information here about 173 + * the attributes of xsd:schema: version, finalDefault, blockDefault, 174 + * elementFormDefault, atgtributeFormDefault, namespace bindings ... 175 + *--> 176 + <xsl:apply-templates/> 177 + </xsl:template> 178 + 179 + <!--* 3 Anotation *--> 180 + 181 + <xsl:template match="xsd:annotation"> 182 + <xsl:element name="div"> 183 + <xsl:attribute name="class">annotation</xsl:attribute> 184 + <xsl:attribute name="id"> 185 + <xsl:call-template name="leid"> 186 + </xsl:call-template> 187 + </xsl:attribute> 188 + <xsl:if test="not(./xsd:documentation//*[@class='bodytext'])"> 189 + <xsl:element name="h3">Annotation</xsl:element> 190 + </xsl:if> 191 + <xsl:element name="div"> 192 + <xsl:choose> 193 + <xsl:when test="./xsd:documentation//*[@class='bodytext']"> 194 + <!--* if the schema document is already using class=bodytext, 195 + * let the schema author control the margins, don't 196 + * assign the class here. 197 + *--> 198 + </xsl:when> 199 + <xsl:otherwise> 200 + <xsl:attribute name="class">bodytext</xsl:attribute> 201 + </xsl:otherwise> 202 + </xsl:choose> 203 + <xsl:apply-templates/> 204 + </xsl:element> 205 + </xsl:element> 206 + 207 + </xsl:template> 208 + 209 + <xsl:template match="xsd:documentation"> 210 + <xsl:choose> 211 + <xsl:when test=".//xhtml:* or .//div or .//p or .//li"> 212 + <xsl:copy-of select="*"/> 213 + </xsl:when> 214 + <xsl:when test="./*"> 215 + <xsl:message>! Unrecognized children in xs:documentation element</xsl:message> 216 + <xsl:copy-of select="*"/> 217 + </xsl:when> 218 + <xsl:otherwise> 219 + <xsl:call-template name="break-pcdata"> 220 + <xsl:with-param name="s" select="string(.)"/> 221 + </xsl:call-template> 222 + </xsl:otherwise> 223 + </xsl:choose> 224 + </xsl:template> 225 + 226 + <xsl:template name="break-pcdata"> 227 + <xsl:param name="s"></xsl:param> 228 + 229 + <xsl:choose> 230 + <xsl:when test="starts-with($s,'
')"> 231 + <xsl:text>
</xsl:text> 232 + <xsl:element name="br"/> 233 + <xsl:call-template name="break-pcdata"> 234 + <xsl:with-param name="s" select="substring($s,2)"/> 235 + </xsl:call-template> 236 + </xsl:when> 237 + <xsl:when test="starts-with($s,' ')"> 238 + <xsl:text> </xsl:text> 239 + <xsl:call-template name="break-pcdata"> 240 + <xsl:with-param name="s" select="substring($s,2)"/> 241 + </xsl:call-template> 242 + </xsl:when> 243 + <xsl:when test="contains($s,'
')"> 244 + <xsl:value-of select="substring-before($s,'
')"/> 245 + <xsl:text>
</xsl:text> 246 + <xsl:element name="br"/> 247 + <xsl:call-template name="break-pcdata"> 248 + <xsl:with-param name="s" select="substring-after($s,'
')"/> 249 + </xsl:call-template> 250 + </xsl:when> 251 + <xsl:otherwise> 252 + <xsl:value-of select="$s"/> 253 + </xsl:otherwise> 254 + </xsl:choose> 255 + </xsl:template> 256 + 257 + <!--* 4 Top-level components *--> 258 + <xsl:template match=" 259 + xsd:schema/xsd:attribute 260 + | xsd:schema/xsd:element 261 + | xsd:schema/xsd:simpleType 262 + | xsd:schema/xsd:complexType 263 + | xsd:schema/xsd:attributeGroup 264 + | xsd:schema/xsd:import 265 + | xsd:schema/xsd:group 266 + | xsd:schema/xsd:notation 267 + "> 268 + <xsl:call-template name="show-top-level-component"/> 269 + </xsl:template> 270 + 271 + <xsl:template name="show-top-level-component"> 272 + <xsl:variable name="sort"> 273 + <xsl:call-template name="sort"/> 274 + </xsl:variable> 275 + <xsl:variable name="leid"> 276 + <xsl:call-template name="leid"/> 277 + </xsl:variable> 278 + <xsl:variable name="has-heading-already"> 279 + <xsl:choose> 280 + <xsl:when test="./xsd:annotation[1]/xsd:documentation/*//* 281 + [self::xhtml:*[starts-with(local-name(),'h')] 282 + or 283 + self::*[contains(' h1 h2 h3 h4 h5 ',local-name())] 284 + ]"> 285 + <xsl:value-of select="'true'"/> 286 + </xsl:when> 287 + <xsl:otherwise> 288 + <xsl:value-of select="'false'"/> 289 + </xsl:otherwise> 290 + </xsl:choose> 291 + </xsl:variable> 292 + 293 + <xsl:element name="div"> 294 + <xsl:attribute name="id"> 295 + <xsl:value-of select="$leid"/> 296 + </xsl:attribute> 297 + <xsl:element name="h3"> 298 + <xsl:element name="a"> 299 + <xsl:attribute name="name"> 300 + <xsl:value-of select="$leid"/> 301 + </xsl:attribute> 302 + <xsl:choose> 303 + <xsl:when test="count(@name) = 1"> 304 + <xsl:element name="em"> 305 + <xsl:value-of select="@name"/> 306 + </xsl:element> 307 + </xsl:when> 308 + <xsl:when test="self::xsd:import and (count(@namespace) = 1)"> 309 + <xsl:element name="code"> 310 + <xsl:value-of select="@namespace"/> 311 + </xsl:element> 312 + </xsl:when> 313 + </xsl:choose> 314 + </xsl:element> 315 + </xsl:element> 316 +<!-- ** skriver ut rubriken på komplexa typer som har en egen definition ** --> 317 + <xsl:element name="div"> 318 + <xsl:attribute name="class">bodytext</xsl:attribute> 319 + 320 + <xsl:if test="./xsd:annotation/xsd:documentation"> 321 + <xsl:element name="div"> 322 + <xsl:if test="$has-heading-already = 'false'"> 323 + <xsl:element name="h4">Notes</xsl:element> 324 + </xsl:if><!-- /if .$has-heading-already *--> 325 + <xsl:apply-templates select="xsd:annotation/xsd:documentation"/> 326 + <xsl:if test="count(./xsd:annotation/xsd:documentation/@source) = 1"> 327 + <xsl:element name="p"> 328 + <xsl:text>External documentation at </xsl:text> 329 + <xsl:element name="code"> 330 + <xsl:element name="a"> 331 + <xsl:attribute name="href"> 332 + <xsl:value-of select="./xsd:annotation/xsd:documentation/@source"/> 333 + </xsl:attribute> 334 + <xsl:value-of select="./xsd:annotation/xsd:documentation/@source"/> 335 + </xsl:element> 336 + </xsl:element> 337 + </xsl:element> 338 + </xsl:if> 339 + </xsl:element> 340 + </xsl:if><!-- /if ./xsd:annotation/xsd:documentation *--> 341 + 342 + <xsl:element name="div"> 343 + <xsl:element name="pre"> 344 + <xsl:variable name="preceding-node" 345 + select="./preceding-sibling::node()[1]"/> 346 + <xsl:if test="not($preceding-node/self::*) 347 + and (normalize-space($preceding-node) = '')"> 348 + <xsl:value-of select="$preceding-node"/> 349 + </xsl:if> 350 + <xsl:apply-templates select="." mode="echo-xml"/> 351 + </xsl:element> 352 + </xsl:element><!--* div for XSD source form *--> 353 + </xsl:element><!--* div for documentation and formal description *--> 354 + 355 + </xsl:element><!--* div for top-level component *--> 356 + </xsl:template> 357 + 358 + 359 + <!--* 5 xml mode *--> 360 + <xsl:template match="*" mode="echo-xml"> 361 + <xsl:variable name="s0"> 362 + <xsl:call-template name="lastline-suffix"> 363 + <xsl:with-param name="s0" select="preceding-sibling::text() 364 + [string-length(.) > 0][1]" /> 365 + </xsl:call-template> 366 + </xsl:variable> 367 + <xsl:variable name="width"> 368 + <xsl:call-template name="stag-width"> 369 + <xsl:with-param name="indent-length" select="string-length($s0)"/> 370 + </xsl:call-template> 371 + </xsl:variable> 372 + <!--* <xsl:message>Start-tag width for <xsl:value-of select="name()"/> 373 + = <xsl:value-of select="$width"/></xsl:message> *--> 374 + 375 + <xsl:text><</xsl:text> 376 + <xsl:value-of select="name()"/> 377 + <xsl:apply-templates select="@*" mode="echo-xml"> 378 + <xsl:with-param name="break-or-nobreak"> 379 + <xsl:choose> 380 + <xsl:when test="$width > $line-wrap-length">break</xsl:when> 381 + <xsl:otherwise>nobreak</xsl:otherwise> 382 + </xsl:choose> 383 + </xsl:with-param> 384 + <xsl:with-param name="s0"> 385 + <xsl:call-template name="lastline-suffix"> 386 + <xsl:with-param name="s0" select="preceding-sibling::text() 387 + [string-length(.) > 0][1]" /> 388 + </xsl:call-template> 389 + </xsl:with-param> 390 + </xsl:apply-templates> 391 + 392 + <xsl:choose> 393 + <xsl:when test="child::node()"> 394 + <xsl:text>></xsl:text> 395 + <xsl:apply-templates select="node()" mode="echo-xml"/> 396 + <xsl:text></</xsl:text> 397 + <xsl:value-of select="name()"/> 398 + <xsl:text>></xsl:text> 399 + </xsl:when> 400 + <xsl:otherwise>/></xsl:otherwise> 401 + </xsl:choose> 402 + </xsl:template> 403 + 404 + <!--<xsl:template match="xsd:annotation" mode="echo-xml"/>--> 405 + <xsl:template match="@xml:space" mode="echo-xml"/> 406 + 407 + <xsl:template match="@*" mode="echo-xml"> 408 + <xsl:param name="break-or-nobreak">nobreak</xsl:param> 409 + <xsl:param name="s0"></xsl:param> 410 + <xsl:variable name="indent"> 411 + <xsl:choose> 412 + <xsl:when test="normalize-space($s0) = ''"> 413 + <xsl:value-of select="concat($additional-indent,$s0)"/> 414 + </xsl:when> 415 + <xsl:otherwise> 416 + <xsl:value-of select="' '"/> 417 + </xsl:otherwise> 418 + </xsl:choose> 419 + </xsl:variable> 420 + 421 + <xsl:choose> 422 + <xsl:when test="parent::xsd:* and $break-or-nobreak = 'break'"> 423 + <xsl:text>
</xsl:text> 424 + <xsl:value-of select="$indent"/> 425 + </xsl:when> 426 + <xsl:otherwise> 427 + <xsl:text> </xsl:text> 428 + </xsl:otherwise> 429 + </xsl:choose> 430 + <xsl:value-of select="name()"/> 431 + <xsl:text>="</xsl:text> 432 + <xsl:choose> 433 + <xsl:when test="parent::xsd:element 434 + and namespace-uri() = '' 435 + and local-name() = 'ref' 436 + "> 437 + <xsl:call-template name="makelink-maybe"/> 438 + </xsl:when> 439 + <xsl:when test="parent::xsd:attribute 440 + and namespace-uri() = '' 441 + and local-name() = 'ref' 442 + "> 443 + <xsl:call-template name="makelink-maybe"/> 444 + </xsl:when> 445 + <xsl:when test="parent::xsd:restriction 446 + and namespace-uri() = '' 447 + and local-name() = 'base' 448 + "> 449 + <xsl:call-template name="makelink-maybe"/> 450 + </xsl:when> 451 + <xsl:when test="parent::xsd:extension 452 + and namespace-uri() = '' 453 + and local-name() = 'base' 454 + "> 455 + <xsl:call-template name="makelink-maybe"/> 456 + </xsl:when> 457 + <xsl:when test="parent::xsd:group 458 + and namespace-uri() = '' 459 + and local-name() = 'ref' 460 + "> 461 + <xsl:call-template name="makelink-maybe"/> 462 + </xsl:when> 463 + <xsl:when test="parent::xsd:list 464 + and namespace-uri() = '' 465 + and local-name() = 'itemType' 466 + "> 467 + <xsl:call-template name="makelink-maybe"/> 468 + </xsl:when> 469 + <xsl:when test="parent::xsd:union 470 + and namespace-uri() = '' 471 + and local-name() = 'memberTypes' 472 + "> 473 + <xsl:call-template name="makelink-several-maybe"/> 474 + </xsl:when> 475 + <xsl:when test="parent::xsd:element 476 + and namespace-uri() = '' 477 + and local-name() = 'type' 478 + "> 479 + <xsl:call-template name="makelink-maybe"/> 480 + </xsl:when> 481 + <xsl:when test="parent::xsd:attribute 482 + and namespace-uri() = '' 483 + and local-name() = 'type' 484 + "> 485 + <xsl:call-template name="makelink-maybe"/> 486 + </xsl:when> 487 + <xsl:when test="parent::xsd:element 488 + and namespace-uri() = '' 489 + and local-name() = 'substitutionGroup' 490 + "> 491 + <xsl:call-template name="makelink-several-maybe"/> 492 + </xsl:when> 493 + 494 + <xsl:otherwise> 495 + <xsl:value-of select="."/> 496 + </xsl:otherwise> 497 + </xsl:choose> 498 + <xsl:text>"</xsl:text> 499 + 500 + </xsl:template> 501 + <xsl:template match="text()" mode="echo-xml"> 502 + <b><xsl:value-of select="."/></b> 503 + </xsl:template> 504 + 505 + 506 + <!--* 6 toc *--> 507 + <xsl:template mode="toc" match=" 508 + xsd:schema/xsd:annotation 509 + | xsd:schema/xsd:attribute 510 + | xsd:schema/xsd:element 511 + | xsd:schema/xsd:simpleType 512 + | xsd:schema/xsd:complexType 513 + | xsd:schema/xsd:attributeGroup 514 + | xsd:schema/xsd:import 515 + | xsd:schema/xsd:group 516 + | xsd:schema/xsd:notation 517 + "> 518 + <xsl:call-template name="toc-entry"/> 519 + </xsl:template> 520 + 521 + <xsl:template name="toc-entry"> 522 + <xsl:variable name="sort"> 523 + <xsl:call-template name="sort"/> 524 + </xsl:variable> 525 + <xsl:variable name="leid"> 526 + <xsl:call-template name="leid"/> 527 + </xsl:variable> 528 + <xsl:element name="li"> 529 + <xsl:element name="a"> 530 + <xsl:attribute name="href"> 531 + <xsl:value-of select="concat('#',$leid)"/> 532 + </xsl:attribute> 533 + <xsl:choose> 534 + <xsl:when test="self::xsd:annotation 535 + and 536 + ( descendant::xhtml:h1 or descendant::xhtml:h2 or descendant::xhtml:h3 537 + or descendant::h1 or descendant::h2 or descendant::h3) 538 + "> 539 + <xsl:choose> 540 + <xsl:when test="descendant::xhtml:h1"> 541 + <xsl:value-of select="descendant::xhtml:h1[1]"/> 542 + </xsl:when> 543 + <xsl:when test="descendant::h1"> 544 + <xsl:value-of select="descendant::h1[1]"/> 545 + </xsl:when> 546 + <xsl:when test="descendant::xhtml:h2"> 547 + <xsl:value-of select="descendant::xhtml:h2[1]"/> 548 + </xsl:when> 549 + <xsl:when test="descendant::h2"> 550 + <xsl:value-of select="descendant::h2[1]"/> 551 + </xsl:when> 552 + <xsl:when test="descendant::xhtml:h3"> 553 + <xsl:value-of select="descendant::xhtml:h3[1]"/> 554 + </xsl:when> 555 + <xsl:when test="descendant::h3"> 556 + <xsl:value-of select="descendant::h3[1]"/> 557 + </xsl:when> 558 + </xsl:choose> 559 + 560 + </xsl:when> 561 + <xsl:otherwise> 562 + <xsl:value-of select="concat($sort,' ')"/> 563 + <xsl:choose> 564 + <xsl:when test="count(@name) = 1"> 565 + <xsl:element name="em"> 566 + <xsl:value-of select="@name"/> 567 + </xsl:element> 568 + </xsl:when> 569 + <xsl:when test="self::xsd:annotation"> 570 + <xsl:value-of select="1 + count(preceding-sibling::xsd:annotation)"/> 571 + </xsl:when> 572 + <xsl:when test="self::xsd:import"> 573 + <xsl:element name="code"> 574 + <xsl:value-of select="@namespace"/> 575 + </xsl:element> 576 + </xsl:when> 577 + <xsl:otherwise> 578 + <!--* fake it *--> 579 + <xsl:variable name="gi" select="local-name()"/> 580 + <xsl:value-of select="1 + count(preceding-sibling::*[local-name() = $gi])"/> 581 + </xsl:otherwise> 582 + </xsl:choose> 583 + </xsl:otherwise> 584 + </xsl:choose> 585 + </xsl:element> 586 + </xsl:element> 587 + 588 + </xsl:template> 589 + 590 + <!--* 7 common code for calculating sort and little-endian IDs *--> 591 + <xsl:template name="sort"> 592 + <xsl:choose> 593 + <xsl:when test="self::xsd:annotation"> 594 + <xsl:value-of select="'Annotation'"/> 595 + </xsl:when> 596 + <xsl:when test="self::xsd:attribute"> 597 + <xsl:value-of select="'Attribute'"/> 598 + </xsl:when> 599 + <xsl:when test="self::xsd:element"> 600 + <xsl:value-of select="'Element'"/> 601 + </xsl:when> 602 + <xsl:when test="self::xsd:simpleType"> 603 + <xsl:value-of select="'Simple type'"/> 604 + </xsl:when> 605 + <xsl:when test="self::xsd:complexType"> 606 + <xsl:value-of select="'Complex type'"/> 607 + </xsl:when> 608 + <xsl:when test="self::xsd:attributeGroup"> 609 + <xsl:value-of select="'Attribute group'"/> 610 + </xsl:when> 611 + <xsl:when test="self::xsd:group"> 612 + <xsl:value-of select="'Model group'"/> 613 + </xsl:when> 614 + <xsl:otherwise> 615 + <xsl:variable name="gi" select="local-name()"/> 616 + <xsl:value-of select="concat( 617 + translate(substring($gi,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 618 + substring($gi,2) 619 + )"/> 620 + </xsl:otherwise> 621 + </xsl:choose> 622 + </xsl:template> 623 + <xsl:template name="leid"> 624 + <xsl:choose> 625 + <xsl:when test="self::xsd:annotation"> 626 + <xsl:value-of select="concat('ann_', 627 + string(1+count(preceding-sibling::xsd:annotation)))"/> 628 + </xsl:when> 629 + <xsl:when test="self::xsd:attribute"> 630 + <xsl:value-of select="concat('att_',@name)"/> 631 + </xsl:when> 632 + <xsl:when test="self::xsd:element"> 633 + <xsl:value-of select="concat('elem_',@name)"/> 634 + </xsl:when> 635 + <xsl:when test="self::xsd:simpleType"> 636 + <xsl:value-of select="concat('type_',@name)"/> 637 + </xsl:when> 638 + <xsl:when test="self::xsd:complexType"> 639 + <xsl:value-of select="concat('type_',@name)"/> 640 + </xsl:when> 641 + <xsl:when test="self::xsd:attributeGroup"> 642 + <xsl:value-of select="concat('attgrp_',@name)"/> 643 + </xsl:when> 644 + <xsl:when test="self::xsd:group"> 645 + <xsl:value-of select="concat('grp_',@name)"/> 646 + </xsl:when> 647 + <xsl:when test="self::xsd:import"> 648 + <xsl:value-of select="concat('imp_', 649 + string(1+count(preceding-sibling::xsd:import)))"/> 650 + </xsl:when> 651 + <xsl:otherwise> 652 + <xsl:choose> 653 + <xsl:when test="@name"> 654 + <xsl:variable name="sort" select="local-name()"/> 655 + <xsl:value-of select="concat($sort,'_',@name)"/> 656 + </xsl:when> 657 + <xsl:otherwise> 658 + <xsl:variable name="sort" select="local-name()"/> 659 + <xsl:variable name="pos" select="1 + count(preceding-sibling::*[local-name() = $sort])"/> 660 + <xsl:value-of select="concat($sort,'_',$pos)"/> 661 + </xsl:otherwise> 662 + </xsl:choose> 663 + </xsl:otherwise> 664 + </xsl:choose> 665 + </xsl:template> 666 + 667 + <!--* 8 unmatched elements (mostly diagnostic for development) *--> 668 + <xsl:template match="*|@*"> 669 + <xsl:variable name="fqgi"> 670 + <xsl:call-template name="fqgi"/> 671 + </xsl:variable> 672 + <xsl:message>Warning: <xsl:value-of select="$fqgi"/> not matched.</xsl:message> 673 + <xsl:element name="div"> 674 + <xsl:attribute name="class">warning</xsl:attribute> 675 + <xsl:value-of select="concat('<',name(),'>')"/> 676 + <xsl:copy> 677 + <xsl:apply-templates select="@*|node()"/> 678 + </xsl:copy> 679 + <xsl:value-of select="concat('</',name(),'>')"/> 680 + </xsl:element> 681 + </xsl:template> 682 + 683 +<xsl:template name="fqgi" match="*" mode="fqgi"> 684 + <xsl:param name="sBuf"/> 685 + <xsl:variable name="sCur"> 686 + <xsl:choose> 687 + <xsl:when test="self::*"> 688 + <xsl:value-of select="name()"/> 689 + </xsl:when> 690 + <xsl:otherwise> 691 + <xsl:value-of select="concat('@',name())"/> 692 + </xsl:otherwise> 693 + </xsl:choose> 694 + </xsl:variable> 695 + 696 + <!--* 697 + <xsl:message>FQGI(<xsl:value-of select="concat($sBuf,',',$sCur)"/>)</xsl:message> 698 + *--> 699 + <xsl:choose> 700 + <xsl:when test="parent::*"> 701 + <xsl:apply-templates mode="fqgi" select="parent::*"> 702 + <xsl:with-param name="sBuf"> 703 + <xsl:value-of select="concat('/',$sCur,$sBuf)"/> 704 + </xsl:with-param> 705 + </xsl:apply-templates> 706 + </xsl:when> 707 + <xsl:otherwise> 708 + <xsl:value-of select="concat('/',$sCur,$sBuf)"/> 709 + </xsl:otherwise> 710 + </xsl:choose> 711 + </xsl:template> 712 + 713 + 714 + <!--* 9 intra-document link calculation, qname manipulation *--> 715 + <xsl:template name="makelink-several-maybe"> 716 + <xsl:param name="lQNames" select="normalize-space(.)"/> 717 + <xsl:choose> 718 + <xsl:when test="contains($lQNames,' ')"> 719 + <!--* recur *--> 720 + <xsl:call-template name="makelink-maybe"> 721 + <xsl:with-param name="qn" select="substring-before($lQNames,' ')"/> 722 + </xsl:call-template> 723 + <xsl:text> </xsl:text> 724 + <xsl:call-template name="makelink-several-maybe"> 725 + <xsl:with-param name="lQNames" select="substring-after($lQNames,' ')"/> 726 + </xsl:call-template> 727 + </xsl:when> 728 + <xsl:otherwise> 729 + <!--* base step, no blank so at most one QName *--> 730 + <xsl:call-template name="makelink-maybe"> 731 + <xsl:with-param name="qn" select="$lQNames"/> 732 + </xsl:call-template> 733 + </xsl:otherwise> 734 + </xsl:choose> 735 + </xsl:template> 736 + 737 + <xsl:template name="makelink-maybe"> 738 + <xsl:param name="qn" select="."/> 739 + <xsl:param name="refns"> 740 + <xsl:call-template name="qname-to-uri"> 741 + <xsl:with-param name="qname" select="$qn"/> 742 + </xsl:call-template> 743 + </xsl:param> 744 + <xsl:param name="lname"> 745 + <xsl:call-template name="qname-to-ncname"> 746 + <xsl:with-param name="qname" select="$qn"/> 747 + </xsl:call-template> 748 + </xsl:param> 749 + 750 + <xsl:variable name="linktarget"> 751 + <xsl:choose> 752 + <xsl:when test="$tns = $refns"> 753 + <xsl:choose> 754 + <xsl:when test="parent::xsd:element 755 + and local-name() = 'ref' 756 + and count(/xsd:schema/xsd:element[@name = $lname]) = 1"> 757 + <xsl:value-of select="concat('elem_',$lname)"/> 758 + </xsl:when> 759 + <xsl:when test="parent::xsd:element 760 + and local-name() = 'substitutionGroup' 761 + and count(/xsd:schema/xsd:element[@name = $lname]) = 1"> 762 + <xsl:value-of select="concat('elem_',$lname)"/> 763 + </xsl:when> 764 + <xsl:when test="parent::xsd:attribute 765 + and local-name() = 'ref' 766 + and count(/xsd:schema/xsd:attribute[@name = $lname]) = 1"> 767 + <xsl:value-of select="concat('att_',$lname)"/> 768 + </xsl:when> 769 + <xsl:when test="parent::xsd:restriction 770 + and count(/xsd:schema/xsd:*[@name = $lname 771 + and (self::xsd:simpleType or self::xsd:complexType)]) 772 + = 1"> 773 + <xsl:value-of select="concat('type_',$lname)"/> 774 + </xsl:when> 775 + <xsl:when test="parent::xsd:extension 776 + and count(/xsd:schema/xsd:*[@name = $lname 777 + and (self::xsd:simpleType or self::xsd:complexType)]) 778 + = 1"> 779 + <xsl:value-of select="concat('type_',$lname)"/> 780 + </xsl:when> 781 + <xsl:when test="parent::xsd:element 782 + and local-name() = 'type' 783 + and count(/xsd:schema/xsd:*[@name = $lname 784 + and (self::xsd:simpleType or self::xsd:complexType)]) 785 + = 1"> 786 + <xsl:value-of select="concat('type_',$lname)"/> 787 + </xsl:when> 788 + <xsl:when test="parent::xsd:attribute 789 + and local-name() = 'type' 790 + and count(/xsd:schema/xsd:*[@name = $lname 791 + and (self::xsd:simpleType or self::xsd:complexType)]) 792 + = 1"> 793 + <xsl:value-of select="concat('type_',$lname)"/> 794 + </xsl:when> 795 + <xsl:when test="parent::xsd:list 796 + and count(/xsd:schema/xsd:*[@name = $lname 797 + and (self::xsd:simpleType or self::xsd:complexType)]) 798 + = 1"> 799 + <xsl:value-of select="concat('type_',$lname)"/> 800 + </xsl:when> 801 + <xsl:when test="parent::xsd:union 802 + and count(/xsd:schema/xsd:*[@name = $lname 803 + and (self::xsd:simpleType or self::xsd:complexType)]) 804 + = 1"> 805 + <xsl:value-of select="concat('type_',$lname)"/> 806 + </xsl:when> 807 + <xsl:when test="parent::xsd:group 808 + and count(/xsd:schema/xsd:group[@name = $lname]) = 1"> 809 + <xsl:value-of select="concat('grp_',$lname)"/> 810 + </xsl:when> 811 + <xsl:when test="parent::xsd:attributeGroup 812 + and count(/xsd:schema/xsd:atributeGroup[@name = $lname]) = 1"> 813 + <xsl:value-of select="concat('attgrp_',$lname)"/> 814 + </xsl:when> 815 + <!--* static links to built-ins could be handled here *--> 816 + </xsl:choose> 817 + </xsl:when> 818 + <xsl:when test="count(ancestor::*/namespace::*) = 0"> 819 + <!--* we are either in a no-namespace document in Opera, 820 + * or we are in Firefox, without ns support. 821 + *--> 822 + <xsl:value-of select="'no-ns-support'"/> 823 + </xsl:when> 824 + <xsl:otherwise> 825 + <!--* namespaces did not match, no target *--> 826 + <xsl:value-of select="'no-target'"/> 827 + </xsl:otherwise> 828 + </xsl:choose> 829 + </xsl:variable> 830 + 831 + <xsl:choose> 832 + <xsl:when test="($linktarget='no-ns-support')"> 833 + <xsl:value-of select="$qn"/> 834 + </xsl:when> 835 + <xsl:when test="($linktarget='no-target' or $linktarget='') 836 + and ($tns = $refns)"> 837 + <xsl:element name="span"> 838 + <xsl:attribute name="class">external-link same-ns</xsl:attribute> 839 + <xsl:value-of select="$qn"/> 840 + </xsl:element> 841 + </xsl:when> 842 + <xsl:when test="($linktarget='no-target') 843 + and not($tns = $refns)"> 844 + <xsl:element name="span"> 845 + <xsl:attribute name="class">external-link diff-ns</xsl:attribute> 846 + <xsl:value-of select="$qn"/> 847 + </xsl:element> 848 + </xsl:when> 849 + <xsl:otherwise> 850 + <xsl:element name="a"> 851 + <xsl:attribute name="href"> 852 + <xsl:value-of select="concat('#',$linktarget)"/> 853 + </xsl:attribute> 854 + <xsl:value-of select="$qn"/> 855 + </xsl:element> 856 + </xsl:otherwise> 857 + </xsl:choose> 858 + </xsl:template> 859 + 860 + <xsl:template name="qname-to-uri" match="*" mode="qname-to-uri"> 861 + <xsl:param name="qname" select="."/> 862 + <xsl:variable name="prefix" select="substring-before($qname,':')"/> 863 + <xsl:choose> 864 + <xsl:when test="(1=1) and ($prefix='xml')"> 865 + <!--* we need to special-case 'xml', since 866 + * Opera does not provide a ns node for it. 867 + *--> 868 + <xsl:value-of select="'http://www.w3.org/XML/1998/namespace'"/> 869 + </xsl:when> 870 + <xsl:when test="self::*"> 871 + <!--* we're an element *--> 872 + <xsl:value-of select="string(namespace::*[name()=$prefix])"/> 873 + </xsl:when> 874 + <xsl:otherwise> 875 + <!--* we're not an element *--> 876 + <xsl:value-of select="string(parent::*/namespace::*[name()=$prefix])"/> 877 + </xsl:otherwise> 878 + </xsl:choose> 879 + </xsl:template> 880 + <xsl:template name="qname-to-ncname"> 881 + <xsl:param name="qname" select="."/> 882 + <xsl:choose> 883 + <xsl:when test="contains($qname,':')"> 884 + <xsl:value-of select="substring-after($qname,':')"/> 885 + </xsl:when> 886 + <xsl:otherwise> 887 + <xsl:value-of select="$qname"/> 888 + </xsl:otherwise> 889 + </xsl:choose> 890 + </xsl:template> 891 + 892 + <xsl:template name="lastline-suffix"> 893 + <xsl:param name="s0"></xsl:param> 894 + <xsl:choose> 895 + <xsl:when test="contains($s0,'
')"> 896 + <xsl:call-template name="lastline-suffix"> 897 + <xsl:with-param name="s0" select="substring-after($s0,'
')"/> 898 + </xsl:call-template> 899 + </xsl:when> 900 + <xsl:otherwise> 901 + <xsl:value-of select="$s0"/> 902 + </xsl:otherwise> 903 + </xsl:choose> 904 + </xsl:template> 905 + 906 + 907 + <xsl:template name="stag-width"> 908 + <xsl:param name="indent-length" select="0"/> 909 + 910 + <xsl:variable name="attcount" select="count(@*)"/> 911 + <xsl:variable name="list-attname-lengths"> 912 + <xsl:call-template name="make-length-list"> 913 + <xsl:with-param name="kw">attnames</xsl:with-param> 914 + </xsl:call-template> 915 + </xsl:variable> 916 + 917 + <xsl:variable name="list-attval-lengths"> 918 + <xsl:call-template name="make-length-list"> 919 + <xsl:with-param name="kw">attvals</xsl:with-param> 920 + </xsl:call-template> 921 + </xsl:variable> 922 + 923 + <xsl:variable name="sum-att-lengths"> 924 + <xsl:call-template name="sum-list"> 925 + <xsl:with-param name="s0" select="concat($list-attname-lengths,' ',$list-attval-lengths)"/> 926 + </xsl:call-template> 927 + </xsl:variable> 928 + 929 + <!--* 930 + <xsl:message>indent-length = <xsl:value-of select="$indent-length"/></xsl:message> 931 + <xsl:message>attcount = <xsl:value-of select="$attcount"/></xsl:message> 932 + <xsl:message>sum-att-lengths = <xsl:value-of select="$sum-att-lengths"/></xsl:message> 933 + <xsl:message>namelen = <xsl:value-of select="string-length(name())"/></xsl:message> 934 + *--> 935 + 936 + <xsl:value-of select="$indent-length + (4 * $attcount) + $sum-att-lengths + string-length(name()) + 3"/> 937 + 938 + </xsl:template> 939 + 940 + 941 + <xsl:template name="make-length-list"> 942 + <xsl:param name="kw">unknown</xsl:param> 943 + <xsl:choose> 944 + <xsl:when test="$kw = 'attnames'"> 945 + <xsl:apply-templates select="@*" mode="attnamelength"/> 946 + </xsl:when> 947 + <xsl:when test="$kw = 'attvals'"> 948 + <xsl:apply-templates select="@*" mode="attvallength"/> 949 + </xsl:when> 950 + <xsl:otherwise>0</xsl:otherwise> 951 + </xsl:choose> 952 + </xsl:template> 953 + 954 + <xsl:template name="sum-list"> 955 + <xsl:param name="n0" select="0"/> 956 + <xsl:param name="s0"/> 957 + 958 + <xsl:variable name="s1" select="normalize-space($s0)"/> 959 + 960 + <!--* 961 + <xsl:message><xsl:value-of select="concat('n0 =', $n0, ', s1 = /',$s1,'/')"/></xsl:message> 962 + *--> 963 + 964 + <xsl:choose> 965 + <xsl:when test="contains($s1,' ')"> 966 + <xsl:variable name="term" select="substring-before($s1,' ')"/> 967 + <xsl:variable name="s2" select="substring-after($s1,' ')"/> 968 + <xsl:call-template name="sum-list"> 969 + <xsl:with-param name="n0" select="$n0 + $term"/> 970 + <xsl:with-param name="s0" select="$s2"/> 971 + </xsl:call-template> 972 + </xsl:when> 973 + <xsl:otherwise> 974 + <xsl:value-of select="$n0 + $s1"/> 975 + </xsl:otherwise> 976 + </xsl:choose> 977 + </xsl:template> 978 + 979 + <!--xsl:template match="@*" mode="attnamelength"> 980 + <xsl:value-of select="concat(string-length(name()), ' ')"/> 981 + </xsl:template--> 982 + <!--xsl:template match="@*" mode="attvallength"> 983 + <xsl:value-of select="concat(string-length(.), ' ')"/> 984 + </xsl:template--> 985 + 986 +</xsl:stylesheet> 987 +<!-- Keep this comment at the end of the file 988 +Local variables: 989 +mode: xml 990 +sgml-default-dtd-file:"/Library/SGML/Public/Emacs/xslt.ced" 991 +sgml-omittag:t 992 +sgml-shorttag:t 993 +sgml-indent-data:t 994 +sgml-indent-step:1 995 +End: 996 +-->