xsl-list
[Top] [All Lists]

Re: RE: Transformation XML to XML

2005-07-19 08:04:28

You probably just need two templates:

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

<xsl:template match="image">
<image>
<xsl:for-each select="*">
<xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
</image>
</xsl:template>




The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later. 

This indicates that you are testing your stylesheet by running it in
IE. Using a browser for stylesheet development can be painful as
browsers are not really designed to report errors, and you can't see the
generated html, only the rendering that is produced by that html.

It's best to first test with a command line tool (or integrated editing
xslt IDE) (saxon is good for this) so that you can generate actual html
files and get sensible error messages. then run on the browser once it's
working.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--