473,657 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create a new xml using xslt

12 New Member
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 1860
dorinbogdan
839 Recognized Expert Contributor
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
LavanyaM
12 New Member
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 Recognized Expert Contributor
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
LavanyaM
12 New Member
hi,
can you give me a sample xml to xml transformtion using xslt?
May 10 '07 #5
LavanyaM
12 New Member
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>Sm ith</family_name>
</person>
<person username="ND1">
<name>Nancy</name>
<family_name>Da volio</family_name>
</person>
</persons>

XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:styleshe et 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="@userna me"/>" &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
2504
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 hierarchy (by the key) I can set the CurrentY parameter by itself + some constant correctly. Hence which each call the CurrentY gets bigger. But when the template reaches a leave and the caller is poped from
0
2178
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). The html form needs to be dynamically generated from the schema as the schema may change in future. We need the forms to provide a UI for users to edit the underlying xml documents represented by the schema. Im wandering if there is an easy way...
5
7627
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 business components that can be consumed by WebForms, WinForms, mobile devices, etc? Is it even fair to compare the such technologies? - How about for cases when you need to display dynamic elements on the form/grid (as compared to knowing data elements...
3
2642
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 id="MyExpenseDetails_lbl" xlink:role="displayLabel">Expense Details</label> <label id="InternalExpense_lbl" xlink:role="displayLabel">Internal
7
5202
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 name from inbound xml to my internal elements to standardize disparate input. Now I could just create an xslt stylesheet for each possible inbound format and be done, but I think it would be powerful to be able store this mapping in a database and...
6
2579
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 schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because:
2
2717
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. My only problem now is to highlight all parent nodes above the one selected. Does anyone have any ideas as to achieve this.. XML DATA ..........................................................
4
2755
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> <Destination> <Salutation>Hi Mark</Salutation> <UniqueID>4120</UniqueID>
4
3454
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"?> <Company name="AVB"> <Id> Reed </Id> <Persons>
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.