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

Re: inheritance and encapsulation in xslt? / xslt for

Subject: Re: inheritance and encapsulation in xslt? / xslt for xlink?
From: Howard Stearns <stearns@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 20:49:07 -0400
howard stearns
Suppose I start with an empty specialized stylesheet, acme-corp-2html.xsl, that xsl:imports the general stylesheet, us-gaap-ci-2html.xsl. Even without defining any templates of its own, acme-corp-2html.xsl will handle all the elements that the general stylesheet can handle. That's good.

However, the acme-corp instance documents uses many elements (let's say it could be hundreds) that are not present in generic us-gaap-ci instance documents. Assuming that the imported us-gaap-ci-2html.xsl just simplistically defines templates that match based on element names in the us-gaap-ci.xsd, these specialized Acme elements won't be matched by the imported templates.

I don't see how xsl:import helps me to get the generic us-gaap-ci-2html.xsl templates to apply to the new elements used by Acme corp. (Or am I missing something?)

I could manually determine the names of elements that are unique to acme-corp, and add template rules for each into acme-corp-2html.xsl. The bodies of these templates would be exactly the same as the templates of the corresponding elements in the included stylesheet. And there are thousands of companies like Acme Corp.

I want to be able to write versions of generic stylesheets (like us-gaap-ci-2html.xsl) that will work no only for us-gaap-ci.xsd instance documents, but also for any documents derived from us-gaap-ci that define their own more specialized elements.



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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