Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] XSLT 2.1: ElementTest against several names?

From: Florent Georges <lists@------------>
To:
Date: 12/1/2008 12:20:00 PM
Michael Kay wrote:

> >     element(my:element|ns:elem)

> No, there's no such proposal on the table.

  Thanks for your response.

> I would have thought it likely, given a well-designed schema, that
> if it makes sense for a function to accept either of these two
> types, they will have some relationship in the schema. For example,
> they will be members of the same substitition group, or they will
> have the same type. You should then be able to refer to them
> generically using the substitution group name or the type name.

  Mmh, yes, I see the point.  And I think that's the way I would
prefer to achieve this.  But still, I think using the above
ElementTest would be legitimate in some cases, mainly:

    1/ if SA is not available.  In this case, the best one can achieve
       is to use element().  SA is great, but there are several
       reasons one can not have it (one example is an open source
       stylesheet, the developer wants to broaden as possible the
       number of processors its stylesheet will be able to run on;)

    2/ in a multi-schemas transformation, where some schemas are
       completely independent, defined by different organizations, I
       can think of situations where one wants to write a function
       that will accept some well-identified elements from those
       schemas, but does not want to write a schema only to create an
       (artificial) link between them.

  More generally, I think the schemas define the grammar of valid XML
instances, while the stylesheet functions and named templates define
processing on those instance, and the rules for parameter typing can
be different from the rules of the grammar...

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent