- From: <paul.downey@bt.com>
- Date: Wed, 25 Oct 2006 12:22:30 +0100
- To: <public-xsd-databinding@w3.org>
Herin a status report on the detection of patterns. We have an XSLT to detect patterns in an XSD or WSDL document. This also reports any elements or attributes not covered by our patterns: http://www.w3.org/2002/ws/databinding/patterns/6/09/patternsdetector.xsl The detector is generated from patterns.xml: http://www.w3.org/2002/ws/databinding/patterns/6/09/patterns.xml using a stylesheet: http://www.w3.org/2002/ws/databinding/edcopy/patterns/patterns2detector.xsl You can see the result of running this against each of our patterns in the examples directory: http://www.w3.org/2002/ws/databinding/examples/6/09/ e.g. the "StringElement" pattern: http://www.w3.org/2002/ws/databinding/patterns/6/09/StringElement/ is demonstrated by the a "StringElement" example: http://www.w3.org/2002/ws/databinding/examples/6/09/StringElement/ which presents the output of the patterns detector run against the Schema: http://www.w3.org/2002/ws/databinding/examples/6/09/StringElement/StringElement-patterns.xml The source code, including the ant task used to run the detector and build the overview documents, is all in: http://www.w3.org/2002/ws/databinding/edcopy/patterns Still to-do: * optionally follow imports and includes - avoid processing the same schema more than once * more testing with non-example schemas - collect patterns, ensure we don't miss-fire * we need more test assertions when running against the example documents - eg example includes-patterns="a,b,c" excludes-patterns="d,e,f" * reported line number for an 'unknown' XPaths is always '-1' - an artifact of running Saxon from a Java stream * consider citing and counting the detected schema fragments which match a pattern - report the matched XPath results? * wrap the detector up as a validation service - (possibly best done as a JSP if we continue to use Saxon?) HTH Paul
Received on Wednesday, 25 October 2006 11:22:46 UTC