Jump to content

xml into xslt


Recommended Posts

I want to change my xml file into xsl so that it can fit into my chart, I am trying to put it into ascending form…

This is my .xml<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="banks.xsl"?>

<chart caption='Banks' xAxisName='Bank Types' yAxisName='Amount' numberPrefix='$' showValues='0'>


<set label='UOB' value='420000' />

<set label='UOB' value='910000' />

<set label='DBS' value='720000' />

<set label='OCBC' value='550000' />

<set label='UOB' value='810000' />

<set label='DBS' value='510000' />

<set label='OCBC' value='680000' />

<set label='UOB' value='620000' />

<set label='DBS' value='610000' />

<set label='OCBC' value='490000' />

<set label='OCBC' value='530000' />

<set label='DBS' value='330000' />






<style name='CanvasAnim' type='animation' param='_xScale' start= '0' duration='1' />




<apply toObject='Canvas' styles='CanvasAnim' />







And this is my .xsl file

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"



<xsl:template match="chart">

<xsl:apply-templates select="label">

<xsl:sort order="ascending" />







I had another try:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output indent="yes"/><xsl:strip-space elements="*"/><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"><xsl:sort select="@value"/></xsl:apply-templates></xsl:copy></xsl:template></xsl:stylesheet>


But both cannot work... please help me...


Thank you!!!

Link to comment
Share on other sites

  • 1 month later...

Try CSS. Or go back over the tutorial. Start small with this task, by getting one element to render, ones that is accomplish. Extend it to your needed portion.Link to another post on this subject.http://w3schools.invisionzone.com/index.php?showtopic=8839&page=1entry47686And here:http://w3schools.invisionzone.com/index.php?showtopic=9130&page=1entry49430

Edited by L8V2L
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...