RE: [xsl] Importing stylesheets (overriding)

Subject: RE: [xsl] Importing stylesheets (overriding)
From: "Ross Ken" <Ken.Ross@xxxxxxxxxxxxxx>
Date: Wed, 7 May 2003 07:58:49 +1000
I'm not sure I understand your problem, but have you looked at importing your "default" stylesheet into a stub, either from a file or created dynamically (remember an XSLT is just an XML document, so you can manipulate it including transform it with XSLTs if you wish).

Rather than importing your "overrides" into the default stylesheet, import your default behaviour into the overrides stylesheet.

HTH,

Ken Ross
Ph: +61 7 32359370
Mob: +61 (0)419 772299
Email: Ken.Ross@xxxxxxxxxxxxxx


-----Original Message-----
From: Karl J. Stubsjoen [mailto:karl@xxxxxxxxxxxxx]
Sent: Wednesday, 7 May 2003 6:44 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Importing stylesheets (overriding)


Hello,

In both cases of import and inclusion of stylesheets, these must occur Top
Level.  This doesn't seem to be the solution I'm after, since I need to
conditionaly choose my override template.

I have a default stylesheet, which has 4 primary functions:
1)  build a very basic HTML table of results for an give XML document
2)  display a basic HTML form for editing (or inserting new) a particular
item in an XML document
3)  display a basic HTML form for confirming the deletion of a record

>From ASP I build and XML document, call up my default template and parse the
XM Document into HTML.  ASP determines which of the 4 functions is occuring
and sets a paramter in the stylesheet appropriately.  The stylesheet has a
template match (with mode) for each of the above functions.

I'd like the ability to be able to override any of the above template
matches with a new one.  As in, from ASP I'd always rely on the default
template, but invision passing the template a parameter which is the URI of
a stylesheet to actually handle the EDIT Form (as an example).

I'm thinking this is not possible, and thinking that I'd need to handle the
override from ASP.  Which isn't entirlely a bad idea.  I just didn't want to
recreate the entire stylesheet and was really hoping to conditionaly
override a template match in the master stylesheet with a snippet of a
stylesheet.

Thanks for the advice!

Karl


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

--------------------------------------------------------------------------------------------------------------------------
IMPORTANT: This email (including any attachments) may contain confidential,
private or legally privileged information and may be protected by copyright. You may
only use it if you are the person(s) it was intended to be sent to and if you use it in an
authorised way. No one is allowed to use, review, alter, transmit, disclose, distribute,
print or copy this e-mail without appropriate authority.
 
If this e-mail was not intended for you and was sent to you by mistake, please
telephone or e-mail me immediately, destroy any hard copies of this e-mail and delete
it and any copies of it from your computer system. Any legal privilege and 
confidentiality attached to this e-mail is not waived or destroyed by that mistake.
 
It is your responsibility to ensure that this e-mail does not contain and is not affected
by computer viruses, defects or interference by third parties or replication problems
(including incompatibility with your computer system).




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread