Jim, Chiming in late on this and I have no suggestions for a tool that does what you describe, but a couple of red flags popped up...not recommendations, but things (maybe) to think about.
It strikes me as worrisome that users might omit what "standardized" XML schemas or DTDs delineate as mandatory. I fear I may be straying into "re-beating of dead horse" territory, but that continues to suggest a move toward totally customized messages traded after individual negotiation with each trading partner...which leads to the questions: is that the way XML is going to be handled in typical usage? Is that a good idea? Also, being the worrier that I am, I was confused by your comment in your response to Bryce that "an individual component is referred to as a 'leaf.'" I'm not so concerned by the term but the implication. A 'leaf' would be at the end of the hierarchical 'branch' meaning it contains no sub-components. In a tree structure (particularly in XML), most individual components are not of the 'leaf' variety and in fact, they may each contain text data and/or other components. Some of those hierarchies are pretty complex and sometimes recursive even. I'm hoping that your pruning plans don't include trimming components from the middle of a branch (unless you're also trimming everything beyond--i.e. from there to the terminal 'leaves'). I personally haven't spent near enough time working with XML messages so I haven't done any performance testing. Are the parsers really that much slower with huge schemas? I've dabbled with some of the UCCnet messages and the SAX parser but haven't noticed any huge performance lags (in my very unscientific play). Best regards and happy new year, Bill Chessman Inovis(tm) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Divoky Sent: Saturday, December 31, 2005 7:51 AM To: [email protected] Subject: [EDI-L] Re: <TECH> Tool for pruning XML Schemas? Hi, Mike The issue is that all elements aren't used. A schema generated by the architecture tool I'm using may contain 100 or even 1000 elements but only 10 elements are actually used. So both mandatory & optional elements may be unused. Much like in an X12 or EDIFACT message only a few elements are actually used. An important step in the process of creating a new message is the creation of a mapping document which in effect provides a list of the required elements since mapping documents don't usually list every unused element. I'd like to use this subset of elements to provide a documented and repeatable process for generating new pruned schemas as the messages change during development. Doing this manually is tedious at best and error prone at worst. It is a rather generic XML Schema issue but given the increasing use of XML for exchanging business transactions I figured this might be a good site to pose the question. My work for the last two years has been almost exclusively XML based. It wouldn't bother me a bit if I never saw another X12 formatted message. Regards, Jim Divoky --- In [email protected], Mike Rawlins <[EMAIL PROTECTED]> wrote: > > Hi Jim, > > No, I don't know of one. I'm not sure what you mean by supplying a list of required elements. Every element in a schema is defined either implicitly or explicitly with a minOccurs attribute. I guess you're wanting to go beyond that and remove just a subset of those with minOccurs of 0? Or, stated differently, define a subset that has minOccurs of 0 and that you want to retain and remove the rest? > > At any rate, this is a pretty generic XML schema kind of question. You might have better luck asking it on xmldev or one of the other XML lists. . Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Access the list online at: http://groups.yahoo.com/group/EDI-L Yahoo! Groups Links . Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Access the list online at: http://groups.yahoo.com/group/EDI-L Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
