[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: inserting a child element while honoring the paren

Subject: Re: inserting a child element while honoring the parent element's content model
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Feb 2023 13:14:59 -0000
Re:  inserting a child element while honoring the paren
Mike,

So interesting! Thank you. The list never ceases to deliver up treasures.

Cheers, Wendell


On Wed, Feb 22, 2023 at 4:37 AM Michael Kay michaelkay90@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> >
> > With respect to *testing* against (not processing in view of) content
> models - I hesitate to mention it but there is the approach of writing out
> the sequence of element names as a string and then testing that against a
> regex mapped out from the content model. One of several problems with this
> approach is that the error messages it produces are pretty useless.Limiting
> the content model in certain ways can make this easier e.g. forbidding
> repeated sequence groups (even worse than 'or' groups).
> >
>
> In 2018, in https://www.saxonica.com/papers/markupuk-2018mhk.pdf
>
> I described how you could write a schema validator in XSLT 3.0. It uses
> the finite state machines in an SCM file generated by a Java schema
> processor; I never got around to writing the other half of the system (the
> schema compiler that generates the FSM) in XSLT, but it's certainly doable.
>
> The actual testing of a sequence of elements against the FSM is
> implemented using xsl:iterate and is very straightforward - see section 4.3
> of the paper.
>
> Michael Kay
> Saxonica
> 
>
>

-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.