Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * Copyright (c) 2004, 2014 Ericsson AB |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * Zoltan Jasz - initial implementation and initial documentation |
| 10 | * Abhishek Gupta |
| 11 | * Attila Balasko |
| 12 | * Endre Kulcsar |
| 13 | * Gabor Bettesch |
| 14 | * Gabor Szalai |
| 15 | * Janos Kovesdi |
| 16 | * Sandor Palugyai |
| 17 | * Tibor Csondes |
| 18 | ******************************************************************************/ |
| 19 | // |
| 20 | // File: http_www_w3_org_XML_1998_namespace.ttcn |
| 21 | // Rev: R9A |
| 22 | // Prodnr: CNL 113 368 |
| 23 | // Reference: |
| 24 | |
| 25 | module http_www_w3_org_XML_1998_namespace { |
| 26 | |
| 27 | |
| 28 | import from XSD all; |
| 29 | |
| 30 | |
| 31 | /* See http://www.w3.org/XML/1998/namespace.html and |
| 32 | http://www.w3.org/TR/REC-xml for information about this namespace. |
| 33 | |
| 34 | This schema document describes the XML namespace, in a form |
| 35 | suitable for import by other schema documents. |
| 36 | |
| 37 | Note that local names in this namespace are intended to be defined |
| 38 | only by the World Wide Web Consortium or its subgroups. The |
| 39 | following names are currently defined in this namespace and should |
| 40 | not be used with conflicting semantics by any Working Group, |
| 41 | specification, or document instance: |
| 42 | |
| 43 | base (as an attribute name): denotes an attribute whose value |
| 44 | provides a URI to be used as the base for interpreting any |
| 45 | relative URIs in the scope of the element on which it |
| 46 | appears; its value is inherited. This name is reserved |
| 47 | by virtue of its definition in the XML Base specification. |
| 48 | |
| 49 | lang (as an attribute name): denotes an attribute whose value |
| 50 | is a language code for the natural language of the content of |
| 51 | any element; its value is inherited. This name is reserved |
| 52 | by virtue of its definition in the XML specification. |
| 53 | |
| 54 | space (as an attribute name): denotes an attribute whose |
| 55 | value is a keyword indicating what whitespace processing |
| 56 | discipline is intended for the content of the element; its |
| 57 | value is inherited. This name is reserved by virtue of its |
| 58 | definition in the XML specification. |
| 59 | |
| 60 | Father (in any context at all): denotes Jon Bosak, the chair of |
| 61 | the original XML Working Group. This name is reserved by |
| 62 | the following decision of the W3C XML Plenary and |
| 63 | XML Coordination groups: |
| 64 | |
| 65 | In appreciation for his vision, leadership and dedication |
| 66 | the W3C XML Plenary on this 10th day of February, 2000 |
| 67 | reserves for Jon Bosak in perpetuity the XML name |
| 68 | xml:Father */ |
| 69 | |
| 70 | |
| 71 | /* This schema defines attributes and an attribute group |
| 72 | suitable for use by |
| 73 | schemas wishing to allow xml:base, xml:lang or xml:space attributes |
| 74 | on elements they define. |
| 75 | |
| 76 | To enable this, such a schema must import this schema |
| 77 | for the XML namespace, e.g. as follows: */ |
| 78 | /* < */ |
| 79 | /* schema . . . */ |
| 80 | /* > */ |
| 81 | /* . . . */ |
| 82 | /* < */ |
| 83 | /* import namespace="http://www.w3.org/XML/1998/namespace" |
| 84 | schemaLocation="http://www.w3.org/2001/03/xml.xsd"/ */ |
| 85 | /* > */ |
| 86 | /* Subsequently, qualified reference to any of the attributes |
| 87 | or the group defined below will have the desired effect, e.g. */ |
| 88 | /* < */ |
| 89 | /* type . . . */ |
| 90 | /* > */ |
| 91 | /* . . . */ |
| 92 | /* < */ |
| 93 | /* attributeGroup ref="xml:specialAttrs"/ */ |
| 94 | /* > */ |
| 95 | /* will define a type which will schema-validate an instance |
| 96 | element with any of those attributes */ |
| 97 | |
| 98 | |
| 99 | /* In keeping with the XML Schema WG's standard versioning |
| 100 | policy, this schema document will persist at |
| 101 | http://www.w3.org/2001/03/xml.xsd. |
| 102 | At the date of issue it can also be found at |
| 103 | http://www.w3.org/2001/xml.xsd. |
| 104 | The schema document at that URI may however change in the future, |
| 105 | in order to remain compatible with the latest version of XML Schema |
| 106 | itself. In other words, if the XML Schema namespace changes, the version |
| 107 | of this document at |
| 108 | http://www.w3.org/2001/xml.xsd will change |
| 109 | accordingly; the version at |
| 110 | http://www.w3.org/2001/03/xml.xsd will not change. */ |
| 111 | |
| 112 | |
| 113 | /* In due course, we should install the relevant ISO 2- and 3-letter |
| 114 | codes as the enumerated possible values . . . */ |
| 115 | type XSD.Language Lang |
| 116 | with { |
| 117 | variant "name as uncapitalized"; |
| 118 | variant "attribute"; |
| 119 | }; |
| 120 | |
| 121 | |
| 122 | type enumerated Space |
| 123 | { |
| 124 | default_, |
| 125 | preserve |
| 126 | } |
| 127 | with { |
| 128 | variant "text 'default_' as 'default'"; |
| 129 | variant "name as uncapitalized"; |
| 130 | variant "defaultForEmpty as 'preserve'"; |
| 131 | variant "attribute"; |
| 132 | }; |
| 133 | |
| 134 | |
| 135 | /* See http://www.w3.org/TR/xmlbase/ for |
| 136 | information about this attribute. */ |
| 137 | type XSD.AnyURI Base |
| 138 | with { |
| 139 | variant "name as uncapitalized"; |
| 140 | variant "attribute"; |
| 141 | }; |
| 142 | |
| 143 | |
| 144 | } |
| 145 | with { |
| 146 | encode "XML"; |
| 147 | variant "namespace as 'http://www.w3.org/XML/1998/namespace'"; |
| 148 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; |
| 149 | extension "version R9A" |
| 150 | } |