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

Re: How to incrementally add to a result document?

Subject: Re: How to incrementally add to a result document?
From: "Paul Tyson phtyson@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jun 2024 00:43:44 -0000
Re:  How to incrementally add to a result document?
This is an interesting sort of problem. Will your "metadata" output be 
further machine processed to prove the transformation integrity, or just 
human inspected?

Years ago when I was asked to verify my transform was correct, I wrote 
out a schematron result-document with rules stating what the output 
should look like. Then I ran the schematron rules against the XSLT 
output. In your case, you could tell schematron to report not only what 
was expected, but why.

I probably used different modes, as Martin originally suggested. As 
Wendell points out, this is a bit removed from the actual logic of the 
templates.

Regards,
--Paul

On 6/28/24 17:14, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote:
> Roger,
>
> Yes, what Martin said.
>
> If you don't like separate modes because you want your tracing logic 
> coupled closely to your transformation logic, the classic 'XSLT 
> approach' would be to build a unified tree in one pass, then 
> post-process that tree twice, once for main outputs (filtering out the 
> logs) and a separate time for the trace log (filtering everything else).
>
> Indeed you might find with the second pass to extract the trace log, 
> you can also enhance it usefully.
>
> More generally, to make XSLT work you need to adopt a 'pipelining' 
> mentality, by which I mean an idea of separate discrete steps 
> achieving discrete aims, working in combination - for example in this 
> case, generating the logged information is actually separate from 
> writing it to a file.
>
> Good luck, Wendell
>
>
>
> On Fri, Jun 28, 2024 at 5:44b/PM Martin Honnen martin.honnen@xxxxxx 
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>
>     On 28/06/2024 23:39, Roger L Costello costello@xxxxxxxxx wrote:
>>     Is there anyway that I can achieve what I desire -- output to one
>>     document the result of mapping the old form to the new form and output
>>     to another document metadata that describes the mapping steps that were
>>     taken? Or is this outside the realm of XSLT's capabilities?
>
>
>     I would consider processing the nodes/elements twice in different
>     modes where one mode creates the primary result and the other one
>     the xsl:result-document.
>
>     XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>     EasyUnsubscribe
>     <http://lists.mulberrytech.com/unsub/xsl-list/174322> (by email)
>
>
>
> -- 
> ...Wendell Piez... ...wendell -at- nist -dot- gov...
> ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
> ...github.com/wendellpiez. <http://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/1043515> 
> (by email <>)

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.