Subject: Re: [xsl] Best practices when reorganizing content? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 21 Mar 2025 21:13:50 -0000 |
The other issues is that the content doesn't have any sort of model/scheam/dtd that is used to validate the results and it looks like anyone can add any structure (or not follow existing patterns) when ever they want. This structure has morphed over the last 2yrs of use so I have early content designs with more recent designs.
What I'm trying to achieve: - stylesheet that is less procedural - reporting of new structures that I might want to look into - error reporting when the content I receive doesn't match "my model view" of what was intended
Any suggestions greaty appreciated.
I wonder whether a single XSLT alone is a good approach, perhaps it is worth trying to use a pipeline (e.g. XProc) to perform some Schematron or JSON schema checking before processing with XSLT. Of course the statement "and it looks like anyone can add any structure (or not follow existing patterns) when ever they want" makes any attempt to work with schemas rather daunting, on the other hand Schematron can probably check whether there is anything outside/beyond the stuff you "target" with a specific selection in XSLT. Or with XSLT 3 I would look into using xsl:assert (https://www.w3.org/TR/xslt-30/#assertions) instead of Schematron to check whether there is any unknown/unexpected content.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Best practices when reorg, Dave Pawson dave.paw | Thread | Re: [xsl] Best practices when reorg, Michael Kay michaelk |
Re: [xsl] Best practices when reorg, Dave Pawson dave.paw | Date | Re: [xsl] Best practices when reorg, Michael Kay michaelk |
Month |