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 variable length string

Post new topic  Reply to topic
 DFDL variable length string « View previous topic :: View next topic » 
Author Message
msnyder
PostPosted: Wed May 02, 2012 5:22 am    Post subject: DFDL variable length string Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 32
Location: Jacksonville, FL

I'm trying to define a variable length string with the length defined in the previous data element, e.g.

    1A
    2AB
    3ABC
and I'm not having success. I thought something like the following would work:

    <xsd:element dfdl:length={../priorElement} dfdl:representation="text" name="textElement" type="textElementType" dfdl:lengthKind="explicit"/>
but this results in:

    CTDV1493E : XPath expression '{../priorElement}' failed to validate. Invalid QName 'priorElement' . . .
any hint would be appreciated. Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 02, 2012 5:37 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You're doing the right thing. This is a known defect.

The workaround is to make your path into an absolute path. So instead of '../priorElement' use '/root/record/subrecord/priorElement'.


Last edited by kimbert on Wed May 02, 2012 1:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
msnyder
PostPosted: Wed May 02, 2012 11:28 am    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 32
Location: Jacksonville, FL

Thanks. One last issue, the variable length data element is part of an array. The 2nd occurrence of the variable length data element is picking up the 1st occurrence's length. So, obviously I've got the length defined wrong. What needs to change to properly specify the length of a variable length data element defined in an array?

    1A
    2AB
    3ABC
    dfdl:length="{/root/record/lastElement}"
The 2nd occurrence of the variable length data element is being parsed as 'A'
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 02, 2012 1:55 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I was afraid that you would come back with this reply. I almost mentioned it in my first response, but I was not 100% sure that it would fail.

I think there is another workaround available to you, but I can't try it out, and I'm reluctant to describe it until I have tried it. I'll post again tomorrow when I'm back in the office.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 03, 2012 12:38 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please can you raise a PMR. This is a defect, so raising a PMR will ensure that we track the issue, and will allow IBM to help others with similar problems.

The problem is in the toolkit only. If you could only bypass the slightly-too-suspicious validation logic in the toolkit then it would all work OK. So if you feel brave, you could add your DFDL xsd to the BAR file using your favourite ZIP utility and deploy the modified BAR file. Not an ideal solution, because the test and debug facilities in the toolkit have no such back door, and will not work until the defect is fixed. But if you're desperate to try this out...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 12:45 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

someone at IBM could have wrote:
Test and debug facilities in the toolkit [ need a ] back door [ to ] bypass the ... validation logic in the toolkit.


I like that idea. Sounds like that idea is ripe for an RFE.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER


Last edited by lancelotlinc on Thu May 03, 2012 12:59 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 03, 2012 12:50 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I said no such thing. Do you fancy a job with one of the British tabloid newspapers? You should fit in pretty well

To be clear, this is not annoyingly-picky strictness getting in the way of valid user aspirations. It's a defect that is stopping a perfectly valid DFDL xsd from being tested and deployed.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 03, 2012 12:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kimbert wrote:
I said no such thing. Do you fancy a job with one of the British tabloid newspapers? You should fit in pretty well

To be clear, this is not annoyingly-picky strictness getting in the way of valid user aspirations. It's a defect that is stopping a perfectly valid DFDL xsd from being tested and deployed.


Ok, I'll say it. It would be really keen to have a way to configure the strictness of certain validation features.

One particularly annoying thing is all the yellow dots on the sides of the ESQL pane that say my valid InputRoot.SOAP.Body.ns:xyz construct does not match any WSDL or XSD even though I used the Ctrl-space completion feature to build the path.

I really like design-time indicators, its just this particular one is a false-positive.

Since Murdock left or was dismissed by the board, do you think I would qualify to be his replacement?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
msnyder
PostPosted: Thu May 03, 2012 1:55 pm    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 32
Location: Jacksonville, FL

kimbert wrote:
Please can you raise a PMR. This is a defect, so raising a PMR will ensure that we track the issue, and will allow IBM to help others with similar problems.

Yes, I already did this afternoon. I might try to see if adding the xsd to the barfile works temporarily. I have a validation issue that might be similar to this one that I temporarily changed the constraint to get around. I'm holding off on this one until I get more of the data model defined since there might be others.

However, I did add another issue to the PMR that probably already has been identified. The workspace somehow gets corrupted when the dfdl xsd is edited in eclipse outside of the dfdl editor which requires the workspace to be recreated. Manually editing the xsd is something that is required for complex data models requiring user defined types.

All in all, you guys did a great job with dfdl. It is a huge improvement over MRM and is saving me a lot of time measured in WEEKS for a single project. I've also requested some simple examples that would help others get jump started. The test facility means we no longer need to keep our fingers crossed when making changes to complex data models. Our MRM days are over. The last frustrating part of the product has been replaced.

The days of sitting in a hotel room late each night hoping to get lucky back in 2000 are a distant memory. At this point, the product is much better than I ever envisioned and even the name is stable . Thanks for your help.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 03, 2012 2:17 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

@lancelotinc: Go for it - I hear the pay's pretty good. Make sure that WebSphere products get some good press, though.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri May 04, 2012 1:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

msnyder: Please can you
- post the PMR number for the benefit of future readers
- add a reference to this thread into the PMR ( if not already done ).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 04, 2012 2:59 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
msnyder: Please can you
- post the PMR number for the benefit of future readers


PMRs contain private customer data and are generally therefore not visible to anyone who does not work at the customer that opened it, and to IBM staff.

The APAR that results from this PMR, however, will be a useful number for future readers to have.
Back to top
View user's profile Send private message
msnyder
PostPosted: Thu May 10, 2012 5:10 am    Post subject: Reply with quote

Apprentice

Joined: 24 May 2002
Posts: 32
Location: Jacksonville, FL

The issue was a result of a corrupted workspace. After creating a new workspace and changing all variable length references to relative paths, the variable length array data elements parsed without issue.
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 variable length string
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.