473,378 Members | 1,410 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

xml to xml using xslt - pls help

3
Hi,

It is my first xslt document that I have to write. And I have to do it quick (1 day). PLease help me.

I have this input xml file:

<?xml version="1.0" encoding="UTF-8"?>
<Node version="1.1.0.0">
<Model Name="x">
<OutputResolution ResX="600" ResY="600">
<ContentType/>
<ContentType>All</ContentType>
<ContentType>Text</ContentType>
<ContentType>ImageScreenShot</ContentType>
<ContentType>LineArt</ContentType>
</OutputResolution>
<Dithering Method="Stochastic">
<ContentType>Text</ContentType>
<ContentType>LineArt</ContentType>
</Dithering>
<Dithering Method="Dispersed">
<ContentType>ImageScreenShot</ContentType>
</Dithering>
</Model>
</Node>

I have to write an xslt file that transforms this xml file above into the following xml file:

<Node version="1.1.0.0">
<Model Name="x">
<OutputResolution ResX="600" ResY="600">
<ContentType Value="ImageScreenShot">
<Dithering Method="Dispersed"/>
</ContentType>
<ContentType Value="LineArt">
<Dithering Method="Stochastic"/>
</ContentType>
<ContentType Value="Text">
<Dithering Method="Stochastic"/>
</ContentType>
</OutputResolution>
</Model>
</Node>

so, the ideea is that i have to extract each Dithering node from input xml and place it at the right place in /Model/ContentType node in output xml. HOW SHOULD THE XSLT CODE LOOK LIKE? PLEASE HELP ME.

THANK YOU
Jan 10 '07 #1
0 994

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. ...
3
by: Tim Dempsey | last post by:
Folks, I need some advice. I hpoe some of you can advise me. Our church's weekly bulletin has been published on paper for years. It is created in MS Word and sent to the publishing company....
5
by: Fred | last post by:
Not much expertise on XSLT and trying to understand it's uses when creating apps in VS.NET? If I wanted flexibility on the UI (View aspect of M.V.C.): - How does it compare with creating...
0
by: canasdaq | last post by:
Can anyone please help me. I was looking at the article "http://www.eggheadcafe.com/articles/20030603.asp". I am new to .net and know nothing in c#. I want to write a menu in asp.net. Can anyone...
6
by: Lenny Wintfeld | last post by:
Hi I'm attempting additions/changes to a Java program that (among other things) uses XSLT to transform a large (96 Mb) XML file. It runs fine on small XML files but generates OutOfMemory...
1
by: Nick | last post by:
I am working on a website for a client and one of their requirements was to have a mailing list. I decided to XSLT to transform "templates" to HTML so that editing was very easy and less time...
4
by: Bill Nguyen | last post by:
I wonder if I can write to an XML file using column structure (and column names) of an SQLserver table. for example: Table A: column1 int column2 char(30) column3 date XML output:
2
by: 张韡武 | last post by:
We have preffered language set as variable in xslt: <xsl:variable name="preferred_language"> zh </xsl:variable> Data: <name xml:lang="de">Raw Materials (Mining incl.)</name> <name...
2
by: Jonny B | last post by:
Hi all, I'm working on an a clientside xslt using jscript that passes a parameter to the xsl. I've got it working no problem in IE but cant get it to work in Mozilla. Can anyone help? This is...
1
by: saritha2008 | last post by:
Hi, I have to convert the following Input xml code to output xml code using xslt. Can any one please help on escaping single quotation present in the input xml file in my xslt? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.