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

Re: accessing xsl document root from an included styl

Subject: Re: accessing xsl document root from an included stylesheet
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 4 Dec 2009 23:14:43 GMT
Re:  accessing xsl document root from an included  styl
> I think I can not use this alternative, as my grammar is not the main
> one : it defines additional attributes and elements that expand the
> base grammars (to be clear : XSD and WADL are the base grammars).
> Thus, I have no idea of what is the root element, which grammar it
> fits, etc. In fact, I know it for *each* of my XSLs, of course, but
> not in my case, as I was looking for a generic template to check the
> namespace version.

so be default you want it to complain. so in your core stylesheet that's
include dinto everything have

<xsl:template match="/*">
  Go away: you are the wrong sort of thing.

Then in a stylesheet that xsl:imports this stylesheet and is inteneded
for http://example.com/a namespace do

<xsl:styesheet xmlns:a="http://example.com/a" ...

<xsl:template match="/a:*>

and similarly another styleseet inplementing a different namespace would
be the same but just letting its namespace through. Any input for which
the top level element doesn't have teh expected namespace will be
matched by the error message template in the included/imported common



The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread


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.
First Name
Last Name
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.