|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Top N Most Common Mistakes [SEC=UNCLASSIFIED]Nicholas.Ardlie at ga.gov.au Nicholas.Ardlie at ga.gov.auTue Aug 14 11:51:03 PDT 2007
>> I think the interesting thing is that, when I finally figure out what the >> actual query is and what the schema structures I want to work with are, >> writing the XQuery query is almost trivial. No idea if this is a common >> experience, but it does make me like using XQuery. This has been my experience too Ron. I developed an encoding tool that auto-generates XML schemas from XMI representations of UML models. The XMI model is a beast and to deal with the fragmented/linked nature of the instance docs (and generic tagged values) I resorted to XQuery. I anticipated that my XQuery module collection would explode as time went on but, to my surprise, it remained relatively simple. Like you say, most of the work was determining XPaths for the input model (in the absence of documentation). It's quite impressive how compact the code can be. My initial hurdles with XQuery were mostly XPath 2 related. A better understanding of sequence expressions certainly helped. Debugging mysteriously empty sequences is a pain and a good unit testing framework would go a long way. (I've tried a few of the xslt unit testing frameworks but it's like pulling teeth). Has anyone had a better experience with unit testing for XQuery? Cheers, Nick Ardlie. -----Original Message----- From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of http://x-query.com/mailman/listinfo/talk Sent: Tuesday, 14 August 2007 4:24 AM To: Smith, Donald T.; http://x-query.com/mailman/listinfo/talk Subject: RE: Top N Most Common Mistakes On Mon, 13 Aug 2007 13:11:43 -0500, Smith, Donald T. wrote > Ron, > > Curious if the schemas you are facing are mostly machine generated (that > is, from some IDE) or if they are hand-crafted. And if hand-crafted, > do they show any discernable design patterns (by which I mean XML Schema > design patterns). Do any of these issues make the schemas easier or > harder to learn? > > Don As far as I know, they're hand generated, based on some ISO specs in the geographic world. I've had two major problems: 1) Learning the subject matter itself (geographic metadata) 2) Working with extremely generic XML of the style: <Parameter Name="foo"> <Value>bar</Value> </Parameter> It's actually much worse than that, with parameters allowing a choice of stuff instead of just values. There are a fair number of co-constraints (i.e. if the parameter is of this type, we always use this form of parameter) but these aren't documented anywhere. There are also a number of referential structures (i.e. take the value of this element and go look up another element with an attribute having the same value). I wouldn't say that the schemas are really all that complex, it's just the usual learning curve of a consultant getting dumped into an unfamiliar environment and being expected to know everything at once. I think the interesting thing is that, when I finally figure out what the actual query is and what the schema structures I want to work with are, writing the XQuery query is almost trivial. No idea if this is a common experience, but it does make me like using XQuery. -- Ron _______________________________________________ http://x-query.com/mailman/listinfo/talk http://x-query.com/mailman/listinfo/talk
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

![Top N Most Common Mistakes [SEC=UNCLASSIFIED]](/images/get_stylus.gif)




