xsl-list
[Top] [All Lists]

Re: inheritance and encapsulation in xslt? / xslt for xlink?

2003-07-21 12:38:51

Would anyone hazard an opinion as to whether the problem or my 
explanation is too difficult?

The latter, I think.

Your question seems to mix up several points (it may be that your
problem really has those mixed, but you'd more likely get an answer if
you split things up into distinct questions)

In particular half the time you talk of schema or dtd specialisation

One will work with instance documents of EITHER schema.
The second provides unique results for SOME of the elements in the more 
specific schema, while many should be transformed in the same way as 
corresponding elements in the general schema.

What are the general techniques for doing this? The specialized schema 
may define hundreds of specialized element tags for which the general 
XSLT behavior is unchanged, and I don't want to have to repeat the 
definitions from the general XSLT with gratuitous name changes for the 
xsl:template match attribute value.



This appears to be exactly what xsl:import is for, define xslt for the
general case and xsl:import that into the stylesheets for the special
cases, which then inherit all the general stuff and just over-ride as
necessary. 


But then in other parts of the document you speak of xlink (but give no
examples) I couldn't follow any of your hints as to your intended xlink
use. As always, it's much easier to answer posts that have very little
text and a small (dozen line) input doc and intendend output.

David


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