[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: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 22 Jul 2003 09:39:01 +0100
Re:  inheritance and encapsulation in xslt? / xslt for

actually using xlink to get this processing seems rather odd. i assume
it's embedded in an annotation element of some sort in the xsd file?

XSLT1 of course doesn't see the XSLT at all so it can't automatically
read anything in teh schema, but even xslt2 which can know about the
schema structure wouldn't see this. If you (they) ae going to use xsd
why didn't they use xsd facilities for this? If for example the new
elements were in the substitution group of the old ones xpath2 would
automaticaly be able to cope.


As is, i think the thing to do is write a stylesheet that transforms

<definitionArc
   xlink:from="ci_unrestrictedCash"
   xlink:to="acme_slushFundCash"
   xlink:arcrole="http://www.xbrl.org/2003/role#general-special"/>


to

<xsl:template match="acme_slushFundCash">
<ci_unrestrictedCash>
<xsl:apply-templates/>
</ci_unrestrictedCash>
</xsl:template>


then that gives you, for each xsd file an xsl.
these generated xsl would transform your instance documents into an
instance of your generic schema, then you just hit that with your main
stylesheet.


So you should only have to hand write one small stylesheet to extract
the links and convert them to templates, plus your main stylesheet,
theen everything for the specialised schema should be automatic.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.