- From: Josh Matthews <joshmatthews@gmail.com>
- Date: Sat, 4 Oct 2008 22:29:28 -0400
- To: mozer <xmlizer@gmail.com>
- Cc: "Norman Walsh" <ndw@nwalsh.com>, "XProc Dev" <xproc-dev@w3.org>
- Message-ID: <ffee23380810041929j45167017hafa2f807dfaf77d2@mail.gmail.com>
On Sat, Oct 4, 2008 at 10:14 PM, Josh Matthews <joshmatthews@gmail.com>wrote: > > (That said, an argument could be made to the contrary: the spec reads "It > is a dynamic error (err:XD0019) if any option value does not satisfy the > type required for that option". The required type for the match option on > p:delete is XSLTMatchPattern (the formal definition of which is, I assume, > the "Pattern" construct in the XSLT spec), which does not allow an empty > string. Even so, I'd still argue that the above use case is possible, sane, > and shouldn't result in an error). > A clarification, sorry: "" is not an empty string ("''" is). I'd say the interpretation of: <p:delete match=""/> is then equivalent to: <p:delete /> which provides for an interesting interpretation of the spec with regards to errors. The specs states "It is a static error (err:XS0038) if any required attribute is not provided." However, in the aforementioned case that results in the equivalent of a call to <p:delete /> (with no match attribute provided), it's just not possible to detect it as a static error (you don't know there's no //a result until you dynamically evaluate the input). Hence, there's no defined error to raise! In my opinion, then, you'd be compliant (and acting for the greater good of XML flexibility!) to just not delete anything. Cheers, Josh Matthews
Received on Sunday, 5 October 2008 02:30:03 UTC