473,407 Members | 2,314 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,407 software developers and data experts.

create a new xml using xslt

hi all,
I createed one xslt from that we can able to see new xml in web browser.but my doubt is, can we able to create a new xml using xslt?


regards,
M.Lavanya
May 9 '07 #1
5 1849
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN....

Yes you can generate new xml using XSL.
Please see this article for some details regarding output element, and also the other chapters will be helpfull.

Dorin.
May 9 '07 #2
Welcome to TheScripts TSDN....

Yes you can generate new xml using XSL.
Please see this article for some details regarding output element, and also the other chapters will be helpfull.

Dorin.
thank you .
i have one more doubt, that is while displaying the filtered xml through browser i dint get the xml declaration part.
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" omit-xml- declaration="no" indent="yes" />
inthat omit-xml-declaration ="no" indicating we need xml declaration, evan though i dint get that.could you please clear me in this.
May 9 '07 #3
dorinbogdan
839 Expert 512MB
Strange behavior.
It seems to be an IE issue, I'm not sure what the reason is.
If you find any workaround please let me know.

Thanks,
Dorin.
May 9 '07 #4
hi,
can you give me a sample xml to xml transformtion using xslt?
May 10 '07 #5
Hi all,
i have developed a sample application.
XML:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="xslt1.xsl"?>
<persons>
<person username="JS1">
<name>John</name>
<family_name>Smith</family_name>
</person>
<person username="ND1">
<name>Nancy</name>
<family_name>Davolio</family_name>
</person>
</persons>

XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" omit-xml-declaration="no" indent="yes" />
<xsl:template match="/">
&lt;person&gt;<xsl:apply-templates/>&lt;/person&gt;
</xsl:template>

<xsl:template match="person">
&lt;name username="<xsl:value-of select="@username"/>" &gt;
<xsl:value-of select="name" />
&lt;/name&gt;
</xsl:template>
</xsl:stylesheet>


but i am not getting the declaration part in the result xml.please help me in this.

Regards,
Lavanya.M
May 15 '07 #6

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

Similar topics

7
by: Rolf Kemper | last post by:
Dear All, somehow I remember that such or similar question was discussed already somewhere. But I can't find it anymore. I have a template calling itself. As long it goes deeper into the...
0
by: Adam Retter | last post by:
Hi Guys, I have a need to create a html form based on my schema. I initially decided to do this using xql, have got some way but am finding this difficult (it may be as I am very new to xql)....
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...
3
by: IMS.Rushikesh | last post by:
Hi Friends, I need a XPath query, whcih ll return me subset of data.... check below xml stream <label id="MyExpenseDetails_lbl" xlink:role="terseLabel">Short Expense Details</label> <label...
7
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
2
by: Anthony | last post by:
Hi all, i have managed to create an asp.net menu using xml and xslt.. i am now trying to highlite the selected path by sending in the path info and hilite it using an xsl select choose function....
4
by: mark4asp | last post by:
I want to write a xslt template to create a xhtml 1.0 (transitional) file which will be sent in as email. Here is a typical xml data file: <BatchEmail> <Domain>www.myDomain.com</Domain>...
4
by: Proogeren | last post by:
Hi I would like to use xslt to modify and xml document that I have. I have created a new xml to make it more easy to explain my problem The xml I have looks like this; <?xml version="1.0"?>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.