OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
xsl processing problem with multiple templates


I have a bunch of fixn.xml files which contain something like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="fix.xsl"?>

Apart from being able to display them alone (via the embedded xsl) I'd like to
turn them into a list of fixes.  It looks like xinclude is what I need for
this, but it isn't actually implemented in any standard browser yet.  However
there's a partial workaround at http://forums.devx.com/showthread.php?t=160331
which I'm trying to get going. 

But I appear to be able to drive the including *or* the transformation, but
not both.  Is this just a namespace issue or is there something insurmountable

My master list of fixes looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xinclude.xsl"?>
<fixlist xmlns:xi="http://www.w3.org/2001/XInclude";>
	<xi:include href="fix1.xml"/>
	<xi:include href="fix2.xml"/>

and the xinclude.xsl, based off the referenced article:

<xsl:stylesheet version="1.0" 
xmlns:xi="http://www.w3.org/2001/XInclude"; exclude-result-prefixes="xi">

	<xsl:include href="no-ns-identity.xsl"/>
	<xsl:template match="xi:include">
	  <xsl:message>Matched include root</xsl:message>
		<xsl:apply-templates select="document(@href)"/>
  <xsl:template match="fixlist">
    <xsl:message>Matched data root</xsl:message>
      <xsl:for-each select="fix">
        <p>Change number: <xsl:value-of select="number"/></p>

Like this, the fixlist match fires and generates the desired html, but without
the includes.

Or if I prevent the fixlist from matching then the xi:include match will fire
and the correct xml is generated, but (of course) is not transformed into

I've tried putting the fixlist into a different namespace, but with no

Is there anyway of getting them both to work in harmony?


Ian S. Worthington, MBCS.

me:     http://isw.me.uk/ 
photos: http://gallery.isw.me.uk/ 

Free 2GB online backups:
  https://mozy.com/?code=HJW4C8 (code gets you 256MB extra)

Web hosting and support from $2.99/month:

Dulce et decorum est pro patria mori, sed dulcius pro patria vivere, et
dulcissimus pro patria biber. Ergo, bibiamo pro salute patriae.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS