[dsdl-comment] Re: modes Scope.

From: Dave Pawson <dave.pawson@gmail.com>
Date: Fri Feb 23 2007 - 18:34:59 UTC

On 23/02/07, George Cristian Bina <george@oxygenxml.com> wrote:

> >> Note that if you can obtain a valid XSLT by removing elements from other
> >> namespaces and attributes from your document then you can use NVDL to
> >> build this XML fragment and validate it with your schema.
> > Sorry I don't understand that sentance.
>
> If you have something like
>
> <sample:test xmlns:sample="sample">
> <sample:a>
> <xsl:stylesheet xmlns:xsl="">
> <sample:b>
> <xsl:template match="/">
> </xsl:template/>
> </sample:b>
> </xsl:stylesheet>
> </sample:a>
> </sample:test>
>
> Then you can obtain an XSLT document by removing all the elements from
> the sample namespace
> <xsl:stylesheet xmlns:xsl="">
> <xsl:template match="/">
> </xsl:template/>
> </xsl:stylesheet>

Yes....

> In this case it should be possible to write an NVDL script that gets all
> the XSLT content by attaching all XSLT sections each up to the previous
> one and that validates the whole XSLT fragment against the XSLT schema.

So the nvdl schema uses 'attach' to do that? to pass validation up the mode tree
to the ancestor that validates against the xslt schema?

>
> [...]
> >> For instance you can have a
> >> schema for XSLT that defines all XSLT elements, each allowing any XSLT
> >> element inside.

Which is the model you have above...

> > I *think* that would have been too loose for what I wanted?
>
> Probably, it depends on what you want :). But from a previous email from
> you (a private email I think) I remember that you may have as input
> xsl:choose without an xsl:when or xsl:otherwise - so it is more to
> change in the XSLT schema than only to add more start elements.
> Recalling that discussion I think the solution I suggested then was to
> make all the required content optional.

Ok. I've got the idea. If attach is the key to this solution I can
try it with a simple model first.

Thanks George.

Have a good weekend.

regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
--
DSDL comments
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-comment-request@dsdl.org
(mailto:dsdl-comment-request@dsdl.org?Subject=unsubscribe)
Received on Fri Feb 23 19:40:59 2007

This archive was generated by hypermail 2.1.8 : Fri Feb 23 2007 - 21:13:03 UTC