xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@ontosys.com
Subject Re: XSLT trouble
Date Wed, 01 Aug 2001 11:30:58 GMT
On Wed, Aug 01, 2001 at 04:38:16PM +0800, Kazi the P i R @ t {- wrote:
> I have made a post earlier about troubl i am having performing the
> transformation from xml to html.  I havent reached a solution
> yet. But it occured to me that maybe i should lessent he scope of my
> troubles! :) so i cut short the xsl file. It looks like this now:

You didn't describe how the output HTML differs from what you want,
but from inspecting your stylesheet I'd guess that you're getting only
the HTML generated by the template that matches the root node, along
with a smattering of empty HTML elements produced by other templates.

1) You don't have templates for most of your element types, so the
default rule will apply and simply run apply-templates whenever those
elements are encountered.  I'd guess that you need more templates
matching your particular element types and generating the HTML content
that you want in each case, calling apply-templates in the appropriate
HTML context.

> <xsl:template match="text()">
> </xsl:template>

2) Here you wrote your own default template for text nodes, causing
all text content to be ignored.  I doubt if you meant that!  Try
removing that rule first.

-- 
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message