Author |
Message
|
IntegrationBus |
Posted: Thu Dec 17, 2015 12:55 am Post subject: How to compare DFDL schema file with schema XSD file? |
|
|
Newbie
Joined: 27 Oct 2015 Posts: 5
|
Hey guys
So as you can see from the title using message broker how can i compare DFDL schema file with schema XSD file using any transformation node ?
i mean Automatic comparison with field name and type
i just need to select DFDL and XSD file and it will print me a message that there is a difference or no |
|
Back to top |
|
|
timber |
Posted: Thu Dec 17, 2015 3:46 am Post subject: |
|
|
Grand Master
Joined: 25 Aug 2015 Posts: 1290
|
Why do you need to compare a DFDL xsd with a non-DFDL xsd? Are you trying to find out whether the DFDL xsd is up to date? |
|
Back to top |
|
|
fjb_saper |
Posted: Thu Dec 17, 2015 5:31 am Post subject: |
|
|
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20729 Location: LI,NY
|
I think the comparison is more about a file xsd (Biztalk) and its corresponding DFDL. _________________ MQ & Broker admin |
|
Back to top |
|
|
IntegrationBus |
Posted: Thu Dec 17, 2015 5:36 am Post subject: |
|
|
Newbie
Joined: 27 Oct 2015 Posts: 5
|
timber wrote: |
Why do you need to compare a DFDL xsd with a non-DFDL xsd? Are you trying to find out whether the DFDL xsd is up to date? |
yes I'm trying to find out whether the DFDL xsd is up to date |
|
Back to top |
|
|
maurito |
Posted: Thu Dec 17, 2015 5:52 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
IntegrationBus wrote: |
timber wrote: |
Why do you need to compare a DFDL xsd with a non-DFDL xsd? Are you trying to find out whether the DFDL xsd is up to date? |
yes I'm trying to find out whether the DFDL xsd is up to date |
and why would you be updating the xsd and not the DFDL xsd ?... you do not need to maintain both. You don't even need to have both, you can use the DFDL xsd where you are using the xsd. |
|
Back to top |
|
|
timber |
Posted: Thu Dec 17, 2015 8:44 am Post subject: |
|
|
Grand Master
Joined: 25 Aug 2015 Posts: 1290
|
Quote: |
why would you be updating the xsd and not the DFDL xsd ?. |
One possible reason is that the xsd is generated by ( exported from ) some other application.
One solution is to treat the xsds as XML ( which they are, of course ) and use an XML comparison program. You will need to strip all of the annotations from both xsds first - that's easy enough using some xsl.
Another solution would be to introduce dire penalties for people who change the xsd in an uncontrolled way. But I expect you have already ruled out that option on the grounds that it is unenforceable.
btw, I would like to know how you manage to keep the original XSD and the DFDL xsd with an identical structure. That suggests that you have complete control over the non-XML format that the DFDL schema is producing. Are you transforming the incoming XML to ( say ) CSV for internal transmission? |
|
Back to top |
|
|
mqjeff |
Posted: Thu Dec 17, 2015 9:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
timber wrote: |
Quote: |
why would you be updating the xsd and not the DFDL xsd ?. |
One possible reason is that the xsd is generated by ( exported from ) some other application. |
And one shouldn't simply regenerate the DFDL ? _________________ chmod -R ugo-wx / |
|
Back to top |
|
|
fjb_saper |
Posted: Thu Dec 17, 2015 9:20 am Post subject: |
|
|
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20729 Location: LI,NY
|
mqjeff wrote: |
timber wrote: |
Quote: |
why would you be updating the xsd and not the DFDL xsd ?. |
One possible reason is that the xsd is generated by ( exported from ) some other application. |
And one shouldn't simply regenerate the DFDL ? |
Now that would mean that the OP has a program that generates the DFDL given the xsd...
You could then diff the resulting DFDL with the current one...
Of course if you do that by hand... happy comparing... _________________ MQ & Broker admin |
|
Back to top |
|
|
mqjeff |
Posted: Thu Dec 17, 2015 9:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
One could do a diff on the current/previous XSD itself, and then modify/update the DFDL based on that result. _________________ chmod -R ugo-wx / |
|
Back to top |
|
|
fjb_saper |
Posted: Thu Dec 17, 2015 9:29 am Post subject: |
|
|
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20729 Location: LI,NY
|
mqjeff wrote: |
One could do a diff on the current/previous XSD itself, and then modify/update the DFDL based on that result. |
Hopefully all this is in source control and available.... _________________ MQ & Broker admin |
|
Back to top |
|
|
timber |
Posted: Thu Dec 17, 2015 10:02 am Post subject: |
|
|
Grand Master
Joined: 25 Aug 2015 Posts: 1290
|
Quote: |
One could do a diff on the current/previous XSD itself |
Yes, I thought of that. But I suspect that the OP is trying to build a BAR file, and wants to check that the DFDL schema and the source xsd are consistent.
In which case, it may be difficult to define 'current version' and 'previous version' in a meaningful way. |
|
Back to top |
|
|
|