Hi,

In the attached DFDL file, I'm running into the following error, Parse Error: 
Unable to parse xs:integer from text: 3, when trying to parse an xs:integer 
element from 3_int.txt. If I change 3 to 3.0, like in 3_decimal.txt, parsing 
works.

I believe the issue may stem from the default dfdl settings in dfdl:format, but 
I'm unable to pin-point what combinations of attributes and values are causing 
this. Any insight into what's causing this?



[cid:image001.png@01DBBF3C.B9927DD0]

Jeremy Yao | Software Engineer
Email: jeremy....@nteligen.com<mailto:jeremy....@nteligen.com>
Website: 
www.nteligen.com<https://api.mobilocard.com/email/SMV8Bq4Q3vdLlqncgwhEMwW1vf92/www.nteligen.com>

CONFIDENTIALITY NOTICE: This message and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged. This information is only for the use of the individual or entity to 
which it was intended. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this message and any accompanying documents is 
strictly prohibited. If you have received this message in error, please contact 
the sender immediately and delete the message. Thank you.

3.0
3
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
	xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/";
	xmlns:fn="http://www.w3.org/2005/xpath-functions";
	elementFormDefault="qualified">

	<xs:include schemaLocation="default-dfdl-properties/defaults.dfdl.xsd" />

	<xs:annotation>
		<xs:appinfo source="http://www.ogf.org/dfdl/";>
			<dfdl:format
				alignment="1"
				alignmentUnits="bytes"
				binaryFloatRep="ieee"
				binaryNumberRep="binary"
				bitOrder="mostSignificantBitFirst"
				byteOrder="bigEndian"
				calendarPatternKind="implicit"
				choiceLengthKind="implicit"
				documentFinalTerminatorCanBeMissing="yes"
				emptyValueDelimiterPolicy="none"
				encoding="ISO-8859-1"
				encodingErrorPolicy="replace"
				escapeSchemeRef=""
				fillByte="f"
				floating="no"
				ignoreCase="no"
				initiator=""
				initiatedContent="no"
				leadingSkip="0"
				lengthKind="delimited"
				lengthUnits="characters"
				nilKind="literalValue"
				nilValueDelimiterPolicy="none"
				occursCountKind="implicit"
				outputNewLine="%CR;%LF;"
				representation="text"
				separator=""
				separatorPosition="infix"
				separatorSuppressionPolicy="anyEmpty"
				sequenceKind="ordered"
				terminator=""
				textBidi="no"
				textNumberCheckPolicy="strict"
				textNumberPattern="#,##0.###;-#,##0.###"
				textNumberRep="standard"
				textNumberRounding="explicit"
				textNumberRoundingIncrement="0"
				textNumberRoundingMode="roundUnnecessary"
				textOutputMinLength="0"
				textPadKind="none"
				textStandardBase="10"
				textStandardDecimalSeparator="."
				textStandardExponentRep="E"
				textStandardGroupingSeparator=","
				textStandardInfinityRep="Inf"
				textStandardNaNRep="NaN"
				textStandardZeroRep="0"
				textTrimKind="none"
				trailingSkip="0"
				truncateSpecifiedLengthString="no"
				utf16Width="fixed"
			/>
		</xs:appinfo>
	</xs:annotation>

	<xs:element name="machine">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="raw_value" type="xs:integer">
				</xs:element>
				<xs:element name="constant" type="xs:string"
					dfdl:inputValueCalc="{
					if(../raw_value eq 0) then '1'
					else if(../raw_value eq 1) then '11'
					else if(../raw_value eq 2) then '111'
					else if(../raw_value eq 3) then '1111'
					else fn:error()
				}">
				</xs:element>
				<xs:element name="description" type="xs:string"
					dfdl:inputValueCalc="{
					if(../raw_value eq 0) then 'asdfasdf'
					else if(../raw_value eq 1) then '2222'
					else if(../raw_value eq 2) then '29340928340'
					else if(../raw_value eq 3) then 'asdklfhaskldfjasdlfjaslkdjflaksjdf'
					else fn:error()
				}">
				</xs:element>
			</xs:sequence>
		</xs:complexType>

	</xs:element>

</xs:schema>

Reply via email to