Re: [xsl] inheritance and encapsulation in xslt? / xslt for xlink?

Subject: Re: [xsl] inheritance and encapsulation in xslt? / xslt for xlink?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 22 Jul 2003 09:39:01 +0100

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