diff --git a/DFDL/attribution/XMLCatalog.xml b/DFDL/attribution/XMLCatalog.xml index 8bdf14c1072c933322ce8cd45f8478758fb93294..585594833a8e3352d716913ce3cc231977bf169b 100644 --- a/DFDL/attribution/XMLCatalog.xml +++ b/DFDL/attribution/XMLCatalog.xml @@ -19,30 +19,30 @@ PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> - <!-- - It would be good to not have this xmlns in here, because eclipse - shows validation errors having to do with the publicId of XMLSchema.dtd - not obeying the pattern. - --> + <!-- + It would be good to not have this xmlns in here, because eclipse + shows validation errors having to do with the publicId of XMLSchema.dtd + not obeying the pattern. + --> <uri name="http://www.ibm.com/xmlns/dfdl/testData" - uri="file:org/apache/daffodil/xsd/tdml.xsd"/> - <uri name="http://www.ogf.org/dfdl/dfdl-1.0/" - uri="file:org/apache/daffodil/xsd/DFDL_part3_model.xsd"/> - <uri name="http://www.ogf.org/dfdl/dfdl-1.0/extensions" - uri="file:org/apache/daffodil/xsd/dfdlx.xsd"/> + uri="org/apache/daffodil/xsd/tdml.xsd" /> + <uri name="http://www.ogf.org/dfdl/dfdl-1.0/" uri="org/apache/daffodil/xsd/DFDL_part3_model.xsd" /> + <uri name="http://www.ogf.org/dfdl/dfdl-1.0/extensions" uri="org/apache/daffodil/xsd/dfdlx.xsd" /> + <!-- <uri name="http://www.ogf.org/dfdl/dfdl-1.0/XMLSchemaSubset" + uri="org/apache/daffodil/xsd/DFDLSubsetOfXMLSchema_v1_036.xsd" /> --> <uri name="http://www.w3.org/2001/XMLSchema" - uri="file:org/apache/daffodil/xsd/XMLSchema_for_DFDL.xsd"/> + uri="org/apache/daffodil/xsd/XMLSchema_for_DFDL.xsd" /> <uri name="http://www.w3.org/XML/1998/namespace" - uri="file:org/apache/daffodil/xsd/xml.xsd"/> - - <!-- Seems the format of catalogs doesn't allow spaces in the publicId. - I don't know if one can replace them with escape %20 stuff or not.--> + uri="org/apache/daffodil/xsd/xml.xsd" /> + <!-- + Seems the format of catalogs doesn't allow spaces in the publicId. + I don't know if one can replace them with escape %20 stuff or not. --> <public publicId="-//W3C//DTD XMLSCHEMA 200102//EN" - uri="file:org/apache/daffodil/xsd/XMLSchema.dtd"/> + uri="org/apache/daffodil/xsd/XMLSchema.dtd" /> <public publicId="datatypes" - uri="file:org/apache/daffodil/xsd/datatypes.dtd"/> + uri="org/apache/daffodil/xsd/datatypes.dtd" /> <uri name="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int" - uri="file:org/apache/daffodil/xsd/dafint.xsd"/> + uri="org/apache/daffodil/xsd/dafint.xsd"/> <uri name="urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext" - uri="file:org/apache/daffodil/xsd/dafext.xsd"/> + uri="org/apache/daffodil/xsd/dafext.xsd"/> </catalog> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd index d46072012463961d5e4d3fc28fa04220f845ed7c..176edbf506e2af15065be90ad3bf221d385cd788 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd @@ -19,100 +19,17 @@ <xs:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:include schemaLocation="DFDLGeneralFormatBase.dfdl.xsd" /> + <!-- Intended for inclusion into other schemas. Has no targetNamespace on purpose --> <xs:annotation> <xs:appinfo source="http://www.ogf.org/dfdl/"> - <!-- - This set of properties should never change. It can be added to - if properties are missing, but should not be changed. - - Changes should be introduced by way of defining new formats in - terms of this one, which override definitions. See below in - the file for examples. - --> - <dfdl:defineFormat name="GeneralFormatOriginal"> - <dfdl:format - alignment="1" - alignmentUnits="bytes" - binaryFloatRep="ieee" - binaryNumberCheckPolicy="lax" - binaryNumberRep="binary" - binaryCalendarEpoch="1970-01-01T00:00:00" - bitOrder="mostSignificantBitFirst" - byteOrder="bigEndian" - calendarCenturyStart="53" - calendarCheckPolicy="strict" - calendarDaysInFirstWeek="4" - calendarFirstDayOfWeek="Sunday" - calendarLanguage="en" - calendarObserveDST="yes" - calendarPatternKind="implicit" - calendarTimeZone="" - choiceLengthKind="implicit" - decimalSigned="yes" - documentFinalTerminatorCanBeMissing="no" - emptyValueDelimiterPolicy="both" - encodingErrorPolicy="replace" - encoding="US-ASCII" - escapeSchemeRef="" - fillByte="%#r20;" - floating="no" - ignoreCase="no" - initiatedContent="no" - initiator="" - leadingSkip="0" - lengthKind="implicit" - lengthUnits="bytes" - occursCountKind="implicit" - outputNewLine="%LF;" - representation="text" - separator="" - separatorPosition="infix" - separatorSuppressionPolicy="anyEmpty" - sequenceKind="ordered" - terminator="" - textBidi="no" - textBooleanPadCharacter="%SP;" - textCalendarJustification="left" - textCalendarPadCharacter="%SP;" - textNumberCheckPolicy="lax" - textNumberJustification="right" - textNumberPadCharacter="%SP;" - textNumberPattern="#,##0.###;-#,##0.###" - textNumberRep="standard" - textNumberRounding="explicit" - textNumberRoundingIncrement="0" - textNumberRoundingMode="roundHalfEven" - textOutputMinLength="0" - textPadKind="none" - textStandardBase="10" - textStandardDecimalSeparator="." - textStandardExponentRep="E" - textStandardGroupingSeparator="," - textStandardInfinityRep="Inf" - textStandardNaNRep="NaN" - textStandardZeroRep="0" - textStringJustification="left" - textStringPadCharacter="%SP;" - textTrimKind="none" - trailingSkip="0" - truncateSpecifiedLengthString="no" - utf16Width="fixed" - /> - </dfdl:defineFormat> - <dfdl:defineFormat name="GeneralFormat"> - <dfdl:format ref="GeneralFormatOriginal" /> + <dfdl:format ref="GeneralFormatBase" + emptyElementParsePolicy="treatAsEmpty"/> </dfdl:defineFormat> - <dfdl:defineFormat name="GeneralFormatPortable"> - <dfdl:format ref="GeneralFormatOriginal" - calendarTimeZone="UTC" - encodingErrorPolicy="error" - /> - </dfdl:defineFormat> - </xs:appinfo> </xs:annotation> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatBase.dfdl.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatBase.dfdl.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f22159a361218c0fb2207b8a8e12bfb086881efb --- /dev/null +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatBase.dfdl.xsd @@ -0,0 +1,108 @@ +<?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. +--> + +<xs:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <!-- Intended for inclusion into other schemas. Has no targetNamespace on purpose --> + <xs:annotation> + <xs:appinfo source="http://www.ogf.org/dfdl/"> + + <!-- + This set of properties should never change. It can be added to + if properties are missing, but should not be changed. + + Changes should be introduced by way of defining new formats in + terms of this one, which override definitions. See below in + the file for examples. + --> + <dfdl:defineFormat name="GeneralFormatBase"> + <dfdl:format + alignment="1" + alignmentUnits="bytes" + binaryFloatRep="ieee" + binaryNumberCheckPolicy="lax" + binaryNumberRep="binary" + binaryCalendarEpoch="1970-01-01T00:00:00" + bitOrder="mostSignificantBitFirst" + byteOrder="bigEndian" + calendarCenturyStart="53" + calendarCheckPolicy="strict" + calendarDaysInFirstWeek="4" + calendarFirstDayOfWeek="Sunday" + calendarLanguage="en" + calendarObserveDST="yes" + calendarPatternKind="implicit" + calendarTimeZone="" + choiceLengthKind="implicit" + decimalSigned="yes" + documentFinalTerminatorCanBeMissing="no" + emptyValueDelimiterPolicy="both" + encodingErrorPolicy="replace" + encoding="US-ASCII" + escapeSchemeRef="" + fillByte="%#r20;" + floating="no" + ignoreCase="no" + initiatedContent="no" + initiator="" + leadingSkip="0" + lengthKind="implicit" + lengthUnits="bytes" + occursCountKind="implicit" + outputNewLine="%LF;" + representation="text" + separator="" + separatorPosition="infix" + separatorSuppressionPolicy="anyEmpty" + sequenceKind="ordered" + terminator="" + textBidi="no" + textBooleanPadCharacter="%SP;" + textCalendarJustification="left" + textCalendarPadCharacter="%SP;" + textNumberCheckPolicy="lax" + textNumberJustification="right" + textNumberPadCharacter="%SP;" + textNumberPattern="#,##0.###;-#,##0.###" + textNumberRep="standard" + textNumberRounding="explicit" + textNumberRoundingIncrement="0" + textNumberRoundingMode="roundHalfEven" + textOutputMinLength="0" + textPadKind="none" + textStandardBase="10" + textStandardDecimalSeparator="." + textStandardExponentRep="E" + textStandardGroupingSeparator="," + textStandardInfinityRep="Inf" + textStandardNaNRep="NaN" + textStandardZeroRep="" + textStringJustification="left" + textStringPadCharacter="%SP;" + textTrimKind="none" + trailingSkip="0" + truncateSpecifiedLengthString="no" + utf16Width="fixed" + /> + </dfdl:defineFormat> + + </xs:appinfo> + </xs:annotation> + +</xs:schema> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatPortable.dfdl.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatPortable.dfdl.xsd new file mode 100644 index 0000000000000000000000000000000000000000..183304d91ce270e485784b529a3a9ce8f10daf31 --- /dev/null +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDLGeneralFormatPortable.dfdl.xsd @@ -0,0 +1,38 @@ +<?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. +--> + +<xs:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <xs:include schemaLocation="DFDLGeneralFormatBase.dfdl.xsd" /> + + <!-- Intended for inclusion into other schemas. Has no targetNamespace on purpose --> + <xs:annotation> + <xs:appinfo source="http://www.ogf.org/dfdl/"> + + <dfdl:defineFormat name="GeneralFormat"> + <dfdl:format ref="GeneralFormatBase" + calendarTimeZone="UTC" + encodingErrorPolicy="error" + /> + </dfdl:defineFormat> + + </xs:appinfo> + </xs:annotation> + +</xs:schema> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part1_simpletypes.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part1_simpletypes.xsd index 9d6f351e31398d4a9dd23a29fa158f14828e3eb3..8991c147a9e591e9433cb45fbdf6d1bc7d3f4541 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part1_simpletypes.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part1_simpletypes.xsd @@ -93,9 +93,16 @@ </xsd:simpleType> <xsd:simpleType name="NonEmptyListOfDFDLStringLiteral"> + <xsd:restriction base="dfdl:ListOfDFDLStringLiteral"> + <xsd:minLength value="1"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="NonEmptyListOfDFDLStringLiteral_nilValue"> <xsd:restriction base="dfdl:ListOfDFDLStringLiteral"> <!-- used for dfdl:nilValue. We can give a much clearer diagnostic with a suggestion - on what the user should do instead. So we don't check this here. --> + on what the user should do instead, ie did they mean to use '%ES;'. So we don't + check this here. --> <!-- <xsd:minLength value="1"/> --> </xsd:restriction> </xsd:simpleType> @@ -626,6 +633,13 @@ </xsd:restriction> </xsd:simpleType> + <xsd:simpleType name="EmptyElementParsePolicyEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="treatAsEmpty" /> + <xsd:enumeration value="treatAsAbsent" /> + </xsd:restriction> + </xsd:simpleType> + <!-- ============================================================= --> <!-- Simple types with DFDL Expression --> <!-- ============================================================= --> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part2_attributes.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part2_attributes.xsd index 9f0b2a2159c42708c7008532498dbb60f824d466..8b3b3018a0927688d7b3daad1f87684535c3e944 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part2_attributes.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part2_attributes.xsd @@ -61,12 +61,15 @@ except it applies to elements instead of attributes (xs:any vs xs:anyAttribute). See the description above for how this group works to enable strict validation of dfdl namespace elements and lax validation of - other elements. + other elements. Note that in addition to specifying ##other (i.e. non-DFDL + namespace) as lax, we must also specify ##local (i.e. no-namespace) as lax. + Only specifying ##other does not match no-namespace elements. --> <xsd:group name="anyOther"> - <xsd:sequence> + <xsd:choice> <xsd:any namespace="##other" processContents="lax" /> - </xsd:sequence> + <xsd:any namespace="##local" processContents="lax" /> + </xsd:choice> </xsd:group> <xsd:attributeGroup name="BaseAG"> @@ -98,8 +101,9 @@ <xsd:attribute name="bitOrder" type="dfdl:BitOrderEnum"/> <xsd:attribute ref="daf:parseUnparsePolicy"/> <!-- backwards compatibility --> <xsd:attribute ref="dfdlx:parseUnparsePolicy"/> - <xsd:attribute ref="dfdlx:emptyElementParsePolicy"/> - + <xsd:attribute name="emptyElementParsePolicy" type="dfdl:EmptyElementParsePolicyEnum"/> + <xsd:attribute ref="dfdlx:emptyElementParsePolicy"/> <!-- deprecated --> + <xsd:attribute name="encoding" type="dfdl:EncodingEnum_Or_DFDLExpression" /> <xsd:attribute name="utf16Width" type="dfdl:UTF16WidthEnum" /> @@ -395,12 +399,12 @@ <!-- 13.14 Properties for Nillable Elements --> <xsd:attribute name="nilKind" type="dfdl:NilKindEnum" /> - <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral" /> + <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral_nilValue" /> <xsd:attribute name="nilValueDelimiterPolicy" type="dfdl:NilValueDelimiterPolicyEnum" /> <xsd:attributeGroup name="NillableAG"> <xsd:attribute name="nilKind" type="dfdl:NilKindEnum" /> - <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral" /> + <xsd:attribute name="nilValue" type="dfdl:NonEmptyListOfDFDLStringLiteral_nilValue" /> <xsd:attribute name="nilValueDelimiterPolicy" type="dfdl:NilValueDelimiterPolicyEnum" /> </xsd:attributeGroup> @@ -539,6 +543,7 @@ <xsd:enumeration value="bitOrder"/> <xsd:enumeration value="encoding" /> <xsd:enumeration value="encodingErrorPolicy"/> + <xsd:enumeration value="emptyElementParsePolicy"/> <xsd:enumeration value="utf16Width" /> <xsd:enumeration value="ignoreCase" /> @@ -641,6 +646,8 @@ type="dfdl:EncodingEnum_Or_DFDLExpression" /> <xsd:attribute form="qualified" name="encodingErrorPolicy" type="dfdl:EncodingErrorPolicyEnum" /> + <xsd:attribute form="qualified" name="emptyElementParsePolicy" + type="dfdl:EmptyElementParsePolicyEnum" /> <xsd:attribute form="qualified" name="utf16Width" type="dfdl:UTF16WidthEnum" /> <xsd:attribute form="qualified" name="ignoreCase" @@ -917,7 +924,7 @@ <xsd:attribute form="qualified" name="nilKind" type="dfdl:NilKindEnum" /> <xsd:attribute form="qualified" name="nilValue" - type="dfdl:NonEmptyListOfDFDLStringLiteral" /> + type="dfdl:NonEmptyListOfDFDLStringLiteral_nilValue" /> <xsd:attribute form="qualified" name="nilValueDelimiterPolicy" type="dfdl:NilValueDelimiterPolicyEnum" /> </xsd:attributeGroup> @@ -1031,8 +1038,8 @@ <xsd:attributeGroup ref="dfdl:CalendarFormatAGQualified" /> <xsd:attributeGroup ref="dfdl:BooleanTextAGQualified" /> <xsd:attributeGroup ref="dfdl:BooleanBinaryAGQualified" /> - <xsd:attributeGroup ref="dfdlx:SimpleTypeValueCalcAGQualified" /> <xsd:attributeGroup ref="dfdlx:ObjectKindAGQualified" /> + <xsd:attributeGroup ref="dfdlx:RepTypeAGQualified" /> </xsd:attributeGroup> </xsd:schema> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part3_model.xsd b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part3_model.xsd index 157aaf7543448b519d90bf05831573ec74f50fe0..0267e3a5451ee651b3458a3c0a1842d80faae41e 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part3_model.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/DFDL_part3_model.xsd @@ -361,8 +361,8 @@ <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 ref="dfdlx:RepTypeAG" /> </xsd:attributeGroup> </xsd:schema> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/dafext.xsd b/DFDL/attribution/org/apache/daffodil/xsd/dafext.xsd index 806f6a8f5c7733aec0344857c7dedb90c36f4e15..3afc77cf7b7f3458b1e581eac92a404a0b2bd214 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/dafext.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/dafext.xsd @@ -101,6 +101,18 @@ <xs:element name="tunables"> <xs:complexType> <xs:all> + <xs:element name="allowBigIntegerBits" type="xs:boolean" default="true" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Previous Daffodil releases let schemas define every type's length using "bits" as the length unit + even though the specification allows bit length units only for a specific set of types' binary + representations and does not allow bit length units for any other type's binary representation + or any type's text representation. When this tunable is true, a deprecation warning is issued + when bit length units are incorrectly used. When this tunable is false, a schema definition + error will be issued instead. + </xs:documentation> + </xs:annotation> + </xs:element> <xs:element name="allowExpressionResultCoercion" type="xs:boolean" default="true" minOccurs="0"> <xs:annotation> <xs:documentation> @@ -207,6 +219,40 @@ </xs:restriction> </xs:simpleType> </xs:element> + <xs:element name="infosetWalkerSkipMin" default="32" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Daffodil periodically walks the internal infoset to send events to the configured + InfosetOutputter, skipping at least this number of walk attempts. Larger values + mean delayed InfosetOutputter events and more memory usage; Smaller values mean + more CPU usage. Set this value to zero to never skip any walk attempts. This is + specifically for advanced testing behavior and should not need to be changed by users. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:minInclusive value="0" /> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="infosetWalkerSkipMax" default="2048" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Daffodil periodically walks the internal infoset to send events to the configured + InfosetOutputter. On walks where no progress is made, the number of walks to skip + is increased with the assumption that something is blocking it (like an + unresolved point of uncertainty), up to this maximum value. Higher values mean + less attempts are made when blocked for a long time, but with potentially more + delays and memory usage before InfosetOutputter events are created. This is + specifically for advanced testing behavior and should not need to be changed by users. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:minInclusive value="0" /> + </xs:restriction> + </xs:simpleType> + </xs:element> <xs:element name="inputFileMemoryMapLowThreshold" type="xs:int" default="33554432" minOccurs="0"> <xs:annotation> <xs:documentation> @@ -262,7 +308,7 @@ </xs:documentation> </xs:annotation> </xs:element> - <xs:element name="maxHexBinaryLengthInBytes" default="2147483647" minOccurs="0"> + <xs:element name="maxHexBinaryLengthInBytes" default="1073741823" minOccurs="0"> <xs:annotation> <xs:documentation> The maximum size allowed for an xs:hexBinary element. @@ -271,6 +317,12 @@ <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive value="1" /> + <!-- + The maxInclusive value is set to (Int.MaxValue / 2) since each byte in + hex binary becomes 2 hex chars, and the maximum length of a string in + Java is Int.MaxValue + --> + <xs:maxInclusive value="1073741823" /> </xs:restriction> </xs:simpleType> </xs:element> @@ -314,6 +366,19 @@ </xs:restriction> </xs:simpleType> </xs:element> + <xs:element name="maxParentDirectoriesForDiagnostics" default="3" minOccurs="0"> + <xs:annotation> + <xs:documentation> + The maximum number of parent directories that show up for a file within a diagnostic + message. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:minInclusive value="0" /> + </xs:restriction> + </xs:simpleType> + </xs:element> <xs:element name="maxSkipLengthInBytes" default="1024" minOccurs="0"> <xs:annotation> <xs:documentation> @@ -564,7 +629,11 @@ </xs:element> <xs:simpleType name="TunableEmptyElementParsePolicy"> - <xs:restriction base="dfdlx:EmptyElementParsePolicyEnum" /> + <xs:restriction base="xs:string"> + <xs:enumeration value="treatAsEmpty" /> + <xs:enumeration value="treatAsAbsent" /> + <xs:enumeration value="treatAsMissing" /> <!-- deprecated --> + </xs:restriction> </xs:simpleType> <!-- @@ -616,6 +685,8 @@ <xs:enumeration value="appinfoDFDLSourceWrong" /> <xs:enumeration value="appinfoNoSource" /> <xs:enumeration value="choiceInsideHiddenGroup" /> + <xs:enumeration value="codeGenerator" /> + <xs:enumeration value="deprecatedBigIntegerBits" /> <xs:enumeration value="deprecatedBuiltInFormats" /> <xs:enumeration value="deprecatedEncodingNameUSASCII7BitPacked" /> <xs:enumeration value="deprecatedExpressionResultCoercion" /> @@ -624,6 +695,7 @@ <xs:enumeration value="deprecatedPropertyDFDLXError" /> <xs:enumeration value="deprecatedPropertyDFDLError" /> <xs:enumeration value="deprecatedPropertySeparatorPolicy" /> + <xs:enumeration value="deprecatedRelativeSchemaLocation" /> <xs:enumeration value="discouragedDiscriminatorPlacement" /> <xs:enumeration value="discouragedAssertPlacement" /> <xs:enumeration value="emptyElementParsePolicyError" /> @@ -646,12 +718,15 @@ <xs:enumeration value="queryStylePathExpression" /> <xs:enumeration value="regexPatternZeroLength" /> <xs:enumeration value="textBidiError" /> + <xs:enumeration value="textNumberPatternWarning" /> <xs:enumeration value="textOutputMinLengthOutOfRange" /> <xs:enumeration value="textStandardBaseUndefined" /> <xs:enumeration value="unsupportedAttributeBlockDefault" /> <xs:enumeration value="unsupportedAttributeFinalDefault" /> <xs:enumeration value="unsupportedAttributeFormDefault" /> <xs:enumeration value="unsupportedAttributeSchemaLocation" /> + <xs:enumeration value="variableSet" /> + <xs:enumeration value="xmlParser" /> </xs:restriction> </xs:simpleType> </xs:list> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/dfdlx.xsd b/DFDL/attribution/org/apache/daffodil/xsd/dfdlx.xsd index f6037e78743a5f6867094c9a8bf4514ca719b656..5c32dd9bccfef0ee0fb6cdd0896dce89e83e173a 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/dfdlx.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/dfdlx.xsd @@ -19,6 +19,7 @@ <xs:schema targetNamespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:dfdlx="http://www.ogf.org/dfdl/dfdl-1.0/extensions" @@ -36,10 +37,8 @@ <xs:restriction base="xs:string"> <xs:enumeration value="dfdlx:alignmentKind" /> <xs:enumeration value="dfdlx:choiceBranchKeyRanges" /> - <xs:enumeration value="dfdlx:emptyElementParsePolicy"/> - <xs:enumeration value="dfdlx:inputTypeCalc"/> + <xs:enumeration value="dfdlx:emptyElementParsePolicy"/> <!-- deprecated --> <xs:enumeration value="dfdlx:objectKind"/> - <xs:enumeration value="dfdlx:outputTypeCalc"/> <xs:enumeration value="dfdlx:parseUnparsePolicy"/> <xs:enumeration value="dfdlx:repType"/> <xs:enumeration value="dfdlx:repValueRanges"/> @@ -94,40 +93,34 @@ </xs:restriction> </xs:simpleType> - <xs:attribute name="emptyElementParsePolicy" type="dfdlx:EmptyElementParsePolicyEnum"/> + <xs:attribute name="emptyElementParsePolicy" type="dfdlx:EmptyElementParsePolicyEnum"/> <!-- deprecated --> <xs:simpleType name="EmptyElementParsePolicyEnum"> <xs:restriction base="xs:string"> <xs:enumeration value="treatAsEmpty" /> - <xs:enumeration value="treatAsMissing" /> + <xs:enumeration value="treatAsMissing" /> <!-- deprecated --> </xs:restriction> </xs:simpleType> <xs:attribute name="choiceBranchKeyRanges" type="dfdl:NonEmptyListOfInteger" /> - <xs:attributeGroup name="SimpleTypeValueCalcAG"> - <xs:attribute form="qualified" name="repType" type="dfdl:DFDLQName" /> - <xs:attribute form="qualified" name="inputTypeCalc" type="dfdl:DFDLExpression" /> - <xs:attribute form="qualified" name="outputTypeCalc" type="dfdl:DFDLExpression" /> - <xs:attributeGroup ref="dfdlx:RepValuesAG" /> - </xs:attributeGroup> - <xs:attributeGroup name="RepValuesAG"> <xs:attribute form="qualified" name="repValues" type="dfdl:NonEmptyListofDFDLStringLiteralOrNonEmptyListOfInteger" /> <xs:attribute form="qualified" name="repValueRanges" type="dfdl:NonEmptyListOfInteger" /> </xs:attributeGroup> - <xs:attributeGroup name="SimpleTypeValueCalcAGQualified"> - <xs:attribute form="qualified" name="repType" type="dfdl:DFDLQName" /> - <xs:attribute form="qualified" name="inputTypeCalc" type="dfdl:DFDLExpression" /> - <xs:attribute form="qualified" name="outputTypeCalc" type="dfdl:DFDLExpression" /> - <xs:attributeGroup ref="dfdlx:RepValuesAGQualified" /> - </xs:attributeGroup> - <xs:attributeGroup name="RepValuesAGQualified"> <xs:attribute form="qualified" name="repValues" type="dfdl:NonEmptyListofDFDLStringLiteralOrNonEmptyListOfInteger" /> <xs:attribute form="qualified" name="repValueRanges" type="dfdl:NonEmptyListOfInteger" /> </xs:attributeGroup> + <xs:attributeGroup name="RepTypeAG"> + <xs:attribute form="qualified" name="repType" type="xsd:QName" /> + </xs:attributeGroup> + + <xs:attributeGroup name="RepTypeAGQualified"> + <xs:attribute form="qualified" name="repType" type="xsd:QName" /> + </xs:attributeGroup> + <xs:attributeGroup name="ExtLayeringAGQualified"> <xs:attribute form="qualified" name="layerTransform" type="dfdlx:LayerTransformType" /> <xs:attribute form="qualified" name="layerEncoding" type="dfdl:EncodingEnum_Or_DFDLExpression" /> diff --git a/DFDL/attribution/org/apache/daffodil/xsd/tdml.xsd b/DFDL/attribution/org/apache/daffodil/xsd/tdml.xsd index 5a9c157e31f49b781648c9eb6f7870c37cfa3228..d46450f5ddfbeb766ef36bd7f420ab77dd1fd1dd 100644 --- a/DFDL/attribution/org/apache/daffodil/xsd/tdml.xsd +++ b/DFDL/attribution/org/apache/daffodil/xsd/tdml.xsd @@ -184,6 +184,21 @@ <attribute name="unsupported" type="xs:boolean" use="optional" default="false"/> <attribute name="validation" type="tns:validationType" use="optional"/> <attribute name="implementations" type="tns:implementationsType" use="optional"/> + <attribute name="diagnosticsStripLocationInfo" type="xs:boolean" use="optional" default="true"> + <annotation> + <documentation>We strip the file info from the diagnostics to prevent false + positive matches against the test case's error and warning strings + coming from file/dir names. + + As there are tests that look for correct file/dir names, those + tests will need to NOT strip them and can do so by setting the + test flag to false. + + This is only for purposes of comparing error/warning strings + to the diagnostic messages. Users would always see, displayed, + the full diagnostic messages.</documentation> + </annotation> + </attribute> </attributeGroup>