On Mon, 21 Jan 2008 15:14:58 -0000, David Carlisle <>
wrote:
> For this usage, the (ISO) schematron skeleton files include templates
> that output xpaths (not using any prefixes) to the context of the
> message. (It also has templates that make xpaths with prefixes, suitable
> for human readable error messages, but in many XPath API, it's just
> simpler to report something as
> /*[10]/*[5]
> rather than
> /a:b[3]/c:d[2]
> and then worry how to bind the namespace prefixes.
That's a useful general approach when you don't want to know anything
about the content. In truth, when I'm generating XPaths for particular
projects, I not only want names, but I make use of any unique IDs or
human-readable names in the document, as it can make things easier for
humans (i.e. sometimes a human will look at the XPath and realise where
the problem is, without having to paste the XPath into an editor or some
other tool). There is probably some semi-generic way of doing this,
although I haven't tried to do anything that re-usable so far (re-writing
the XPath generation XSLT on a case-by-case basis isn't such a big task,
in practice).
Cheers, Tony.
--
Anthony B. Coates
Senior Partner
Miley Watts LLP
Experts In Data
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),
UN/CEFACT, MDDL, FpML, UBL.
http://www.mileywatts.com/