| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <xsd:schema targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/" |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" |
| xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:daf="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext" |
| xmlns:dafint="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int" |
| attributeFormDefault="unqualified" elementFormDefault="qualified"> |
| |
| <xsd:include schemaLocation="DFDL_part2_attributes.xsd" /> |
| <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int"/> |
| <xsd:import namespace="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext"/> |
| <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/> |
| |
| |
| <!-- all the dfdl: elements that can appear inside an xs:appinfo element --> |
| <xsd:group name="DFDLAppInfoGroup"> |
| <xsd:choice> |
| <xsd:element ref="dfdl:assert" /> |
| <xsd:element ref="dfdl:choice" /> |
| <xsd:element ref="dfdl:defineEscapeScheme" /> |
| <xsd:element ref="dfdl:defineFormat" /> |
| <xsd:element ref="dfdl:defineVariable" /> |
| <xsd:element ref="dfdl:discriminator" /> |
| <xsd:element ref="dfdl:element" /> |
| <xsd:element ref="dfdl:enumeration" /> |
| <xsd:element ref="dfdl:format" /> |
| <xsd:element ref="dfdl:group" /> |
| <xsd:element ref="dfdl:newVariableInstance" /> |
| <xsd:element ref="dfdl:sequence" /> |
| <xsd:element ref="dfdl:setVariable" /> |
| <xsd:element ref="dfdl:simpleType" /> |
| </xsd:choice> |
| </xsd:group> |
| |
| <!-- ======================================================== --> |
| <!-- DFDL Format definition types --> |
| <!-- ======================================================== --> |
| |
| <!-- 7.2 dfdl:defineFormat --> |
| <xsd:element name="defineFormat" type="dfdl:DFDLDefineFormat" /> |
| <xsd:complexType name="DFDLDefineFormat"> |
| <xsd:sequence> |
| <xsd:element maxOccurs="unbounded" minOccurs="0" |
| ref="dfdl:format" /> |
| </xsd:sequence> |
| <xsd:attribute name="name" type="xsd:NCName" use='required'/> |
| <xsd:attributeGroup ref="dafint:daffodilAG"/> |
| </xsd:complexType> |
| |
| <xsd:element name="format" type="dfdl:DFDLFormat" /> |
| <xsd:complexType name="DFDLFormat"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:FormatAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <!-- 7.5 dfdl:defineEscapeScheme --> |
| <xsd:element name="defineEscapeScheme" type="dfdl:DFDLDefineEscapeScheme" /> |
| |
| <xsd:complexType name="DFDLDefineEscapeScheme"> |
| <xsd:sequence> |
| <xsd:element ref="dfdl:escapeScheme" /> |
| </xsd:sequence> |
| <xsd:attribute name="name" type="xsd:NCName" use='required'/> |
| <xsd:attributeGroup ref="dafint:daffodilAG"/> |
| </xsd:complexType> |
| |
| <xsd:element name="escapeScheme" type="dfdl:DFDLEscapeScheme" /> |
| |
| <xsd:complexType name="DFDLEscapeScheme"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:EscapeSchemeAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <!-- ================================================================= --> |
| <!-- Element form for properties --> |
| <!-- ================================================================= --> |
| |
| <xsd:element name="property" type="dfdl:PropertyType" /> |
| |
| <xsd:complexType name="PropertyType"> |
| <xsd:simpleContent> |
| <xsd:extension base="xsd:string"> |
| <xsd:attribute name="name" use='required'> |
| <xsd:simpleType> |
| <xsd:union memberTypes="dfdl:PropertyNameType dfdlx:PropertyNameType" /> |
| </xsd:simpleType> |
| </xsd:attribute> |
| <xsd:attributeGroup ref="dafint:daffodilAG"/> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| |
| <!-- ================================================================= --> |
| <!-- Elements, types and attribute groups to specify DFDL Variables --> |
| <!-- ================================================================= --> |
| |
| <xsd:complexType name="DFDLVariableType"> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:DFDLStringLiteral_Or_DFDLExpression"> |
| <xsd:attributeGroup ref="dafint:daffodilAG"/> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| |
| <xsd:attributeGroup name="DefineVariableAG"> |
| <xsd:attribute name="name" type="xsd:NCName" use='required'/> |
| <xsd:attribute name="predefined" type="xsd:boolean" /> |
| <xsd:attribute name="type" type="xsd:QName" /> |
| <xsd:attribute name="external" type="xsd:boolean" /> |
| <xsd:attribute name="defaultValue" |
| type="dfdl:DFDLStringLiteral_Or_DFDLExpression" /> |
| <xsd:attribute ref="dfdlx:direction" /> |
| </xsd:attributeGroup> |
| |
| <xsd:attributeGroup name="SetVariableAG"> |
| <xsd:attribute name="ref" type="xsd:QName" use='required'/> |
| <xsd:attribute name="value" |
| type="dfdl:DFDLStringLiteral_Or_DFDLExpression" /> |
| </xsd:attributeGroup> |
| |
| <xsd:attributeGroup name="NewVariableInstanceAG"> |
| <xsd:attribute name="ref" type="xsd:QName" use='required'/> |
| <xsd:attribute name="defaultValue" |
| type="dfdl:DFDLStringLiteral_Or_DFDLExpression" /> |
| </xsd:attributeGroup> |
| |
| <xsd:element name="defineVariable"> |
| <xsd:complexType> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:DFDLVariableType"> |
| <xsd:attributeGroup ref="dfdl:DefineVariableAG" /> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <xsd:element name="newVariableInstance"> |
| <xsd:complexType> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:DFDLVariableType"> |
| <xsd:attributeGroup ref="dfdl:NewVariableInstanceAG" /> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <xsd:element name="setVariable"> |
| <xsd:complexType> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:DFDLVariableType"> |
| <xsd:attributeGroup ref="dfdl:SetVariableAG" /> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <!-- ================================================================================ --> |
| <!-- Elements, types and attribute groups to specify DFDL Assert and Discriminator --> |
| <!-- ================================================================================ --> |
| |
| <!-- The type that models element value as DFDL expression --> |
| <xsd:attributeGroup name="TestConditionAG"> |
| <xsd:attribute name="test" type="dfdl:DFDLExpression" /> |
| <xsd:attribute name="testKind" type="dfdl:TestKindEnum" /> |
| <xsd:attribute name="testPattern" type="dfdl:DFDLRegularExpression" /> |
| <xsd:attribute name="message" type="xsd:string" /> |
| <xsd:attribute name="failureType" type="dfdl:FailureTypeEnum" /> |
| </xsd:attributeGroup> |
| |
| <xsd:complexType name="TestCondition"> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:DFDLExpressionOrPatternOrNothing"> <!-- changed to accept regex --> |
| <xsd:attributeGroup ref="dfdl:TestConditionAG" /> |
| <xsd:attributeGroup ref="dafint:daffodilAG" /> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| |
| <xsd:element name="assert"> |
| <xsd:complexType> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:TestCondition"> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <xsd:element name="discriminator"> |
| <xsd:complexType> |
| <xsd:simpleContent> |
| <xsd:extension base="dfdl:TestCondition"> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <!-- ============================================================ --> |
| <!-- Specialized annotations element definitions --> |
| <!-- ============================================================ --> |
| |
| <xsd:element name="element" type="dfdl:DFDLElementType" /> |
| <xsd:element name="sequence" type="dfdl:DFDLSequenceType" /> |
| <xsd:element name="choice" type="dfdl:DFDLChoiceType" /> |
| <xsd:element name="group" type="dfdl:DFDLGroupType" /> |
| <xsd:element name="simpleType" type="dfdl:DFDLSimpleType" /> |
| <xsd:element name="enumeration" type="dfdl:DFDLEnumerationType" /> |
| |
| <!-- ============================================================= --> |
| <!-- Specialized annotations types --> |
| <!-- ============================================================= --> |
| |
| <xsd:complexType abstract="true" name="DFDLType"> |
| <xsd:sequence> |
| <xsd:element maxOccurs="unbounded" minOccurs="0" |
| ref="dfdl:property" /> |
| <xsd:element maxOccurs="unbounded" minOccurs="0" |
| ref="daf:property" /> |
| </xsd:sequence> |
| <xsd:attributeGroup ref="dafint:daffodilAG"/> |
| </xsd:complexType> |
| |
| <xsd:complexType abstract="true" name="DFDLBaseType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:BaseAG" /> |
| <xsd:attributeGroup ref="dfdl:CommonAG" /> |
| <xsd:attributeGroup ref="dfdl:AlignmentAG" /> |
| <xsd:attributeGroup ref="dfdl:MarkupAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLElementType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:ElementAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLSequenceType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:GroupCommonAG" /> |
| <xsd:attributeGroup ref="dfdl:SequenceAG" /> |
| <xsd:attributeGroup ref="dfdlx:ExtLayeringAGQualified" /> |
| <xsd:attributeGroup ref="dfdl:SeparatorAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLChoiceType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:GroupCommonAG" /> |
| <xsd:attributeGroup ref="dfdl:ChoiceAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLSimpleType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:SimpleTypeAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLEnumerationType"> |
| <xsd:attributeGroup ref="dfdlx:RepValuesAG" /> |
| </xsd:complexType> |
| |
| <xsd:complexType name="DFDLGroupType"> |
| <xsd:complexContent> |
| <xsd:extension base="dfdl:DFDLBaseType"> |
| <xsd:sequence /> |
| <xsd:attributeGroup ref="dfdl:GroupAG" /> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <!-- ======================================================== --> |
| <!-- Specialized annotations attribute groups --> |
| <!-- ======================================================== --> |
| |
| <xsd:attributeGroup name="FormatAG"> |
| <xsd:attributeGroup ref="dfdl:ElementFormatSubsetAG" /> |
| <xsd:attributeGroup ref="dfdl:GroupAG" /> |
| <xsd:attributeGroup ref="dfdl:DocumentPropertiesAG" /> |
| </xsd:attributeGroup> |
| |
| <xsd:attributeGroup name="ElementFormatSubsetAG"> |
| <xsd:attributeGroup ref="dfdl:SimpleTypeAG" /> |
| <xsd:attributeGroup ref="dfdl:FloatingAG" /> |
| <xsd:attributeGroup ref="dfdl:NillableAG" /> |
| <xsd:attributeGroup ref="dfdl:DefaultValueControlAG" /> |
| <xsd:attributeGroup ref="dfdl:OccursAG" /> |
| <xsd:attributeGroup ref="dfdlx:RuntimePropertiesAG" /> |
| </xsd:attributeGroup> |
| |
| <xsd:attributeGroup name="ElementAG"> |
| <xsd:attributeGroup ref="dfdl:ElementFormatSubsetAG" /> |
| <xsd:attributeGroup ref="dfdl:CalculatedValueAG" /> |
| </xsd:attributeGroup> |
| |
| <!-- dfdl:group takes the union of dfdl:sequence and dfdl:choice properties --> |
| <xsd:attributeGroup name="GroupAG"> |
| <xsd:attributeGroup ref="dfdl:GroupCommonAG" /> |
| <xsd:attributeGroup ref="dfdl:SequenceAG" /> |
| <xsd:attributeGroup ref="dfdlx:ExtLayeringAGQualified" /> |
| <xsd:attributeGroup ref="dfdl:ChoiceAG" /> |
| <xsd:attributeGroup ref="dfdl:SeparatorAG" /> |
| </xsd:attributeGroup> |
| |
| <xsd:attributeGroup name="SimpleTypeAG"> |
| <xsd:attributeGroup ref="dfdl:RepresentationAG" /> |
| <xsd:attributeGroup ref="dfdl:NonGroupMarkupAG" /> |
| <xsd:attributeGroup ref="dfdl:LengthAG" /> |
| <xsd:attributeGroup ref="dfdl:SimpleTypesTextAG" /> |
| <xsd:attributeGroup ref="dfdl:StringTextAG" /> |
| <xsd:attributeGroup ref="dfdl:NumberAG" /> |
| <xsd:attributeGroup ref="dfdl:NumberTextAG" /> |
| <xsd:attributeGroup ref="dfdl:TextNumberFormatAG" /> |
| <xsd:attributeGroup ref="dfdl:NumberBinaryAG" /> |
| <xsd:attributeGroup ref="dfdl:FloatBinaryAG" /> |
| <xsd:attributeGroup ref="dfdl:TextBidiSchemeAG" /> |
| <xsd:attributeGroup ref="dfdl:CalendarTextAG" /> |
| <xsd:attributeGroup ref="dfdl:CalendarBinaryAG" /> |
| <xsd:attributeGroup ref="dfdl:CalendarFormatAG" /> |
| <xsd:attributeGroup ref="dfdl:BooleanTextAG" /> |
| <xsd:attributeGroup ref="dfdl:BooleanBinaryAG" /> |
| <xsd:attributeGroup ref="dfdlx:SimpleTypeValueCalcAG" /> |
| <xsd:attributeGroup ref="dfdlx:ObjectKindAG" /> |
| </xsd:attributeGroup> |
| |
| </xsd:schema> |