ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL & xPath

Post new topic  Reply to topic
 DFDL & xPath « View previous topic :: View next topic » 
Author Message
smuktineni
PostPosted: Tue Feb 04, 2014 1:27 pm    Post subject: DFDL & xPath Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

Input is fixed length format with some variable complex types. In below
partial schema, elements Reference and ErrorTypes occursCount is available in elements ReferenceCounter and ErrorCounter.

Code:
  <xsd:annotation>
    <xsd:appinfo source="http://www.ogf.org/dfdl/">
      <dfdl:format alignment="implicit" alignmentUnits="bytes" binaryFloatRep="ieee" byteOrder="bigEndian" calendarCenturyStart="55" calendarCheckPolicy="lax" calendarDaysInFirstWeek="1" calendarFirstDayOfWeek="Sunday" calendarLanguage="en-US" calendarObserveDST="yes" calendarPattern="yyyy-MM-dd-HH.mm.ss.SSSSSS" calendarPatternKind="explicit" calendarTimeZone="UTC-06:00" choiceLengthKind="implicit" decimalSigned="no" documentFinalTerminatorCanBeMissing="yes" emptyValueDelimiterPolicy="none" encoding="{$dfdl:encoding}" escapeSchemeRef="" fillByte="%SP;" floating="no" ignoreCase="yes" initiatedContent="no" initiator="" leadingSkip="0" lengthKind="explicit" lengthUnits="characters" nilKind="literalValue" nilValue="%ES;" nilValueDelimiterPolicy="none" occursCountKind="implicit" representation="text" separator="" sequenceKind="ordered" terminator="" textBidi="no" textBooleanFalseRep="N" textBooleanJustification="left" textBooleanPadCharacter="%WSP;" textBooleanTrueRep="Y" textCalendarJustification="left" textCalendarPadCharacter="0" textNumberCheckPolicy="lax" textNumberJustification="right" textNumberPadCharacter="0" textNumberPattern="*0" textNumberRep="standard" textNumberRounding="pattern" textNumberRoundingIncrement="2.0" textNumberRoundingMode="roundHalfEven" textPadKind="padChar" textStandardBase="10" textStandardZeroRep="0" textStringJustification="left" textStringPadCharacter="%SP;" textTrimKind="none" textZonedSignStyle="asciiTranslatedEBCDIC" trailingSkip="0" truncateSpecifiedLengthString="no" useNilForDefault="yes"/>
    </xsd:appinfo>
  </xsd:annotation>


<xsd:complexType name="ReceivableHeader">
  <xsd:sequence dfdl:sequenceKind="ordered">
     <xsd:element default="P" dfdl:length="1" name="Action" type="tns:Actions"/>
     <xsd:element default="0" dfdl:length="2" dfdl:nilValue="0" name="ChargeCounter" nillable="true" type="xsd:int"/>
     <xsd:element default="0" dfdl:length="2" dfdl:nilValue="0" name="ReferenceCounter" nillable="true" type="xsd:int"/>
    <xsd:element default="0" dfdl:length="2" dfdl:nilValue="0" name="ErrorCounter" nillable="true" type="xsd:int"/>
    <xsd:element dfdl:lengthKind="implicit" dfdl:occursCount="{xs:nonNegativeInteger(parent::ReferenceCounter)}" dfdl:occursCountKind="expression" maxOccurs="unbounded" minOccurs="0" name="Reference" type="tns:ReceivableReference"/>
     <xsd:element dfdl:lengthKind="implicit" dfdl:occursCount="{xs:nonNegativeInteger(../ErrorCounter)}" dfdl:occursCountKind="expression" maxOccurs="unbounded" minOccurs="0" name="ValidationErrors" type="tns:ErrorTypes"/>
  </xsd:sequence>
  </xsd:complexType>


Tried various options for the getting the values of above using xpath
Quote:
parent::ReferenceCounter, ../ReferenceCounter
and ended up with the same errors. Also tried below functions with no luck yet.

Code:
xs:nonNegativeInteger(parent::ReferenceCounter)
xs:number(parent::ReferenceCounter)
xs:int(parent::ReferenceCounter)


Error is
Code:
2014-02-04 15:16:55.875880     6321   UserTrace   BIP5841I: ''Offset: 296. Starting to process element 'ChargeCounter'.''
2014-02-04 15:16:55.875916     6321   UserTrace   BIP5841I: ''Offset: 296. Found nil literal value for element 'ChargeCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.875948     6321   UserTrace   BIP5841I: ''Offset: 298. Found nil literal value for element 'ChargeCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.875972     6321   UserTrace   BIP5841I: ''Offset: 296. Found fixed length value: '06' for element 'ChargeCounter'.''
2014-02-04 15:16:55.876004     6321   UserTrace   BIP5841I: ''Offset: 298. Finished processing element 'ChargeCounter'.''
2014-02-04 15:16:55.876032     6321   UserTrace   BIP5841I: ''Offset: 298. Starting to process element 'ReferenceCounter'.''
2014-02-04 15:16:55.876088     6321   UserTrace   BIP5841I: ''Offset: 298. Found nil literal value for element 'ReferenceCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.876116     6321   UserTrace   BIP5841I: ''Offset: 300. Found nil literal value for element 'ReferenceCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.876144     6321   UserTrace   BIP5841I: ''Offset: 298. Found fixed length value: '00' for element 'ReferenceCounter'.''
2014-02-04 15:16:55.876188     6321   UserTrace   BIP5841I: ''Offset: 300. Finished processing element 'ReferenceCounter'.''
2014-02-04 15:16:55.876220     6321   UserTrace   BIP5841I: ''Offset: 300. Starting to process element 'ErrorCounter'.''
2014-02-04 15:16:55.876256     6321   UserTrace   BIP5841I: ''Offset: 300. Found nil literal value for element 'ErrorCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.876280     6321   UserTrace   BIP5841I: ''Offset: 302. Found nil literal value for element 'ErrorCounter'. The value of the element will be reported as nil.''
2014-02-04 15:16:55.876312     6321   UserTrace   BIP5841I: ''Offset: 300. Found fixed length value: '00' for element 'ErrorCounter'.''
2014-02-04 15:16:55.876344     6321   UserTrace   BIP5841I: ''Offset: 302. Finished processing element 'ErrorCounter'.''
2014-02-04 15:16:55.876452     6321   UserTrace   BIP5843E: ''Cannot resolve expression '{xs:nonNegativeInteger(parent::ReferenceCounter)}' for DFDL property 'occursCount' defined on object '#xmlns(p="http://accounting.abcd.com/Billing")xscd(/type::p:ReceivableHeader/model::sequence/schemaElement::p:Reference)'.''
2014-02-04 15:16:55.876500     6321   UserTrace   BIP5809E: The DFDL parser signalled that an error occurred when processing a DFDL schema.  The message from the DFDL parser is:  'CTDP3085E: Cannot resolve expression '{xs:nonNegativeInteger(parent::ReferenceCounter)}' for DFDL property 'occursCount' defined on object '#xmlns(p="http://accounting.abcd.com/Billing")xscd(/type::p:ReceivableHeader/model::sequence/schemaElement::p:Reference)'.'
                                       A DFDL schema error occurred during the parsing of a DFDL message.
                                       Review and resolve the problems indicated in the message from the DFDL parser.


What would be the right xpath expression and function to get the values of those counters to set on occurscount? Or is my DFDL wrong?
_________________
-Satish
Back to top
View user's profile Send private message Yahoo Messenger
dogorsy
PostPosted: Tue Feb 04, 2014 11:28 pm    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

see:
Code:
17.1     Example: 2d Nested Array


in "Data Format Description Language (DFDL) v1.0 Specification"

Search for "DFDL expressions" (1st hit in the infocentre)
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 05, 2014 1:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You have encountered a known defect. Please open a PMR with IBM and request APARs 97646 and 97905. Please ensure that you reference this thread in the PMR problem description.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
smuktineni
PostPosted: Wed Feb 05, 2014 8:49 am    Post subject: Reply with quote

Apprentice

Joined: 28 Aug 2003
Posts: 33
Location: Omaha

Thank you Kimbert for poiting to the APAR's Will open PMR. Both APAR's are scheduled to release with FP4 scheduled end of this month. Tx again

@dogorsy Yep I looked at the DFDL spec and xpath and all solutions that I tried to resolve were throwing similar error as listed above. Some posts dated back to 2012 had similar xpath references and they said it worked, so I didn't even look into APAR's!
_________________
-Satish
Back to top
View user's profile Send private message Yahoo Messenger
dogorsy
PostPosted: Wed Feb 05, 2014 8:56 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

smuktineni wrote:
Thank you Kimbert for poiting to the APAR's Will open PMR. Both APAR's are scheduled to release with FP4 scheduled end of this month. Tx again

@dogorsy Yep I looked at the DFDL spec and xpath and all solutions that I tried to resolve were throwing similar error as listed above. Some posts dated back to 2012 had similar xpath references and they said it worked, so I didn't even look into APAR's!

yes, APAR is scheduled to be released FP4, but if you open a a PMR you can get a fix before that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DFDL & xPath
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.