----- Original Message -----
From: "Torsten Curdt" <[EMAIL PROTECTED]>
To: "Cocoon Dev" <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 4:49 AM
Subject: Re: Dynamic Schematron validation works!


>
> Jeremy, I don't want to spoil your enthusiasm but there still two major
> issues... I've been talking with Ivelin off the list about these issues.
> (Maybe we should move our discussion to the list?!)
>
> 1) current binding prohibits the use of checkboxes (good old checkbox
>    problem *sigh*) You cannot turn the checkbox off via request.

Does my proposed solution work ?

>
> 2) AFAIU validation happens inside the XSLT transformer. IMHO this should
>    happen inside an action. Otherwise we have to choose what page to show
>    from the XML *content*. Only way I see do this is to create another
>    transformer for this. But still you are not able to react on the
>    validation result inside the sitemap... Or am I missing here something?
>    (Could a transformer set a request attribute that can become available
>    in the sitemap?)

I've come up with 2 possible solutions to this problem so far.
(It seems that you came to the same yourself. )

1) I think we can do a specialized "Validation" transformer, which extends
from XSLT transformer, but also sticks in the sitemap a "validationResult"
attribute, which a subsequent selector can use. The idea seems feasible
based on the behaviour of the WritingDomTransformer which sticks in the
sitemap a DOM object representing the SAX stream.

2) How about a XPath selector, whose when attribute will be a valid XPath
test expression executed against the SAX stream?
then you can possible do something like:

<transformer src="validating-schematron-report.xsl">
<selector type="xpath">
  <selector when="/validatingResult/pattern">
    ... go back to the same page
  <selector otherwise>
    ... move on with life


So which one of the two (if any) is better ?


>
> Currently I am trying to merge Ivelin work what I'm am currently working
> on. I hope I can present this in a few days to the list...
> --
> Torsten
>
> > Dear All,
> >
> > Encouraged by Ivelin Ivanov's work, I tried to see if the XSLT generated
by
> > Schematron could be dynamically generated.
> >
> > It can!
> >
> > Here were my test pipelines (using all Ivelin's files):
> >
> >
> > Using a pre-made validating XSLT:
> >
> > <map:match pattern="static-validation">
> > <map:generate src="schematron/some-xmlform.xml"/>
> > <map:transform src="schematron/xmlform-sch-report.xsl"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> > Using a validating XSLT, generated by another pipeline:
> >
> > <map:match pattern="dynamic-validation">
> > <map:generate src="schematron/some-xmlform.xml"/>
> > <map:transform src="cocoon:/make-validator"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> > A pipeline for generating validating XSLT:
> >
> > <map:match pattern="make-validator">
> > <map:generate src="schematron/xmlform-sch-report.xml"/>
> > <map:transform src="schematron/xmlform-schematron.xsl"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> >
> > Apart from having to comment out a reference to <saxon:output/> in
> > 'wrappers.xsl' it all worked fine.
> >
> > I viewed this with MSIE 5, the xml was the same as the samples.
> >
> >
> > Cool!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to