xsl-list
[Top] [All Lists]

Re: [xsl] My XPath mistakenly referenced an element that doesn't exist and I got no error message ... is this bad language design?

2021-10-14 09:33:08
Graydon, this is good. Yes, fair enough.

In Schematron's favor, it is not so hard to deploy it over collections
(using those 'other pieces'), and when combined with XSLT 3 it's pretty
darned powerful.

I'm not opposed to many ways to do it, of course!

Cheers, Wendell

On Thu, Oct 14, 2021 at 10:28 AM Graydon graydon(_at_)marost(_dot_)ca <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

On Thu, Oct 14, 2021 at 02:19:47PM -0000, Wendell Piez
wapiez(_at_)wendellpiez(_dot_)com scripsit:
Is this solution too demanding? (Not just defensive XSLT with extra
tests in
your XPath but an entire Schematron?) I always wonder, when we get to
that
point. What problem are we actually trying to solve?

We're trying to solve (at least) three:

- transform this to that
- ensure it's the expected this
- ensure it's the expected that

I think it's good practice to build these separately, rather than trying
to stuff the "expected this" part into the XSLT which is transforming
this to that.  (Which means failed "expected this" tests prevent the
transform from being attempted.)

I'd also suggest XQuery in preference to schematron for the "expected
this?" tests.  More power and available in "per collection" (and thus
"entire input content set") aware flavours.


--
Graydon Saunders  | graydonish(_at_)gmail(_dot_)com
Þæs oferéode, ðisses swá mæg.
-- Deor  ("That passed, so may this.")




-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>