ГО СТ Р ИСО/МЭК 8825-5— 2013
xmlns:xyz="
http://example.com/xyz
"
targetNamespace="
http://example.com/xyz
">
<xsd:element name="xyz-elem" type="xsd:string”/>
<xsd:complexType name="Xyz-type">
<xsd:attribute name="xyz-attr” type=“xsd:boolean’7>
</xsd:complexType>
</xsd:schema>
<!--file ’
’http://example.com/abcfmain.xsd’’
- ->
<xsd:schemaxmlns:xsd="
http://www.w3.org/2001/XMLSchema
"
xmlns:xyz="
http://example.com/xyz
"
xmlns:abc="
http://example.com/abc
"
targetNamespace=“
http://example.com/abc
">
<xsd:import namespace=”
http://example.com/xyz"
schemaLocation="
http://example.com/xyz/schema.xsd"/
>
<xsd:inc!ude schemaLocation=”
http://example.com/abc/sub1.xsd"/
>
<xsd:include schemaLocation="
http://example.com/abc/sub2.xsd’7
>
<xsd:element name="abc-elem” type="xyz:Xyz-type"/>
</xsd:schema>
<!--file ’’
http://example.com/abc/sub1
.xsd" - ->
<xsd:schemaxmlns:xsd-’
http://www.w3.org/2001/XMLSchema
"
xmlns:abc=“
http://example.com/abc
"
targetNamespace="
http://example.com/abc
">
<xsd:element name="sub1-elem" type=“xsd:string*7>
</xsd:schema>
<!--file "
http://example.com/abc/sub2.xsd
" - ->
<xsd:schemaxmlns:xsd="
http://www.w3.org/2001/XMLSchema
"
xmlns:abc="
http://example.com/abc
"
targetNamespace="
http://example.com/abc
">
<xsd:element name="sub2-elem ” type="xsd:string”/>
<xsd:attribute name=“sub2-attr" type="xsd:string"/>
</xsd:schema>
Эти четыре документа схемы отображаются в следующихдвух модулях АСН.1:
XYZ - - The module reference is not standardized
DEFINITIONS XER INSTRUCTIONS AUTOMATIC TAGS :
BEGIN
IMPORTS
String FROM XSD[joint-iso-itu-t asnl(l) specification(0)
modules(0)
xsd-module(2) versionl(1)}
/* For a Version 2 napping, the last component of
themodule
identifier would be version2(2) */
Xyz-elem :
Xyz-type
[NAME AS UNCAPITALIZED) XSD.String
SEQUENCE {
xyz-attr [ATTRIBUTE] BOOLEAN OPTIONAL )
ENCODING-CONTROLXER
GLOBAL-DEFAULTSMODIFIED-ENCODINGS
GLOBAL-DEFAULTS CONTROL-NAMESPACE
’■http://www.w3.org/2001/XMLSchema-instance
"
PREFIX "xsi-
NAMESPACE ALL AS
"http://example.com/xyz”
PREFIX "xyz"
END
ABC - - The module reference is not standardized
DEFINITIONS XER INSTRUCTIONS AUTOMATIC TAGS ::■
BEGIN
IMPORTS
Xyz-type FROM XYZ
String FROMXSD [joint-iso-itu-t asnl(l) specification(0)
modules(0)
49