[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
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...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|