OASIS Open Mailing List Archives  ·  All Lists  ·  ubl  ·  2006-08

ubl — archive

[Date Prev]  |  [Thread Prev]  |  [Thread Next]  |  [Date Next]   —  [Date Index]  |  [Thread Index]  |  [Month Index]  |  [List Home]

Creating Instances with XMLSpy was:Re: [ubl-tsc] Order and ForwardingInstructions document instances.


Well i am glad you made me revisit this.  It reminded me of problems we had with XMLSpy for UBL 1.0 as well. The issues is that UBL has several recursive structures (a GoodsItem may contain other GoodsItem, a Package other Packages, etc...).  If you think about this tools like XMLSpy don't know when to stop going down this branch.  It doesn't have an option to say "only go to 2nd depth of recursion". What happens with XMLSpy is it kind of goes a bit crazy and gives up but doesn't tell you that.  It just creates an invalid instance.  my feeling is these errors are almost randomly different each time.  I can understand your frustration! The specific problem with the TransportationStatus document is that its TransportEvent contains ReportedShipment.  ReportedShipment contains GoodsItem (and that can contain other GoodsItems).  ReportedShipment is the problem child. There is a workaround for XMLSpy. It transpires that XMLSpy can deal with these recursive structures if they are the last child of its parent.  Think of this as the rightmost box on the UML diagrams or the last ASBIE for the ABIE in the spreadsheets. So if TransportEvent contained CurrentStatus, Contact and ReportedShipment then XMLSpy could create a valid instance for you. However TransportEvent actually says ReportedShipment, CurrentStatus and Contact, so it doesn't.  Crazy but true. My way of fixing this was to edit the schema to make the order of associations within TransportEvent to be CurrentStatus, Contact and ReportedShipment and create an instance from this.  Then i edited the instance to move ReportedShipment to above CurrentStatus.  It then validates correctly against the correct PRD2 schema.  The result is attached. (you will need to change the name to a .zip and unzip it) In a sense this is not a problem for UBL as schemas behaved correctly. But it does make me think other applications may face similar problems.  Perhaps in our designing of ASBIEs we could be sensitive to some technology issues like this and consider placing recursive structures at the end of their containing structure? NB I will copy this to the UBL list in case others have similar problems or better solutions. PS dont forget to use the Enhanced Grid view when edit this with XMLSpy - it makes life a lot easier.  And if you open the Forwarding Instructions instance at the same time you should be able to cut and paste sections from one to the other. Andrew Schoka wrote: I was working with Paul Thorpe who used a tool based on the ASN.1 version and he produced the attached. I guess it’s a start..... Andy

[Date Prev]  |  [Thread Prev]  |  [Thread Next]  |  [Date Next]   —  [Date Index]  |  [Thread Index]  |  [Month Index]  |  [List Home]