Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2010, 09:49 AM
Authorized User
 
Join Date: Mar 2010
Posts: 45
Thanks: 6
Thanked 0 Times in 0 Posts
Default How to print "<megjegyzes></megjegyzes> " in my xml out put

Hi,



i want to print like below in my xml out put .
<megjegyzes></megjegyzes>

in my xsl i mentioned like <megjegyzes></megjegyzes> expecting to come like same.

but when i run the report , my xml out put is showing like : <megjegyzes/>

may i know what should i need to do so that my final xml out put will show like : <megjegyzes></megjegyzes>

Thanks
Anil
 
Old April 23rd, 2010, 10:07 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Which XSLT processor do you use, how do you serialize the XSLT result?
I don't think there is any way to enforce a particular format, unless your XSLT processor or its serializer give you an option.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old April 23rd, 2010, 10:11 AM
Authorized User
 
Join Date: Mar 2010
Posts: 45
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Hi,

iam using Oracle XSLT. version 2.0


is there any way to show like <megjegyzes></megjegyzes> on XML output?


Thanks
Anil
 
Old April 23rd, 2010, 10:14 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's very unlikely that a serializer will give you options over this. Certainly there's no standard XSLT serialization option for it. This is because it's assumed that the XML is destined to be read by a conformant XML parser, and every conformant XML parser will treat the two constructs in exactly the same way. (similarly, serializers don't usually allow you to say whether you want spaces around the "=" sign in attribute="value", for exactly the same reason).

Where does this requirement come from?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old April 23rd, 2010, 10:19 AM
Authorized User
 
Join Date: Mar 2010
Posts: 45
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Hi,

we have to give an xml out put to my client , so that he will submit this xml electronically to the govt.

The value in <megjegyzes> </megjegyzes> will be updated by him at the time of submission.


so for this he want to generate the xml with <megjegyzes> </megjegyzes>

Thanks
Anil
 
Old April 23rd, 2010, 10:58 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If you want to make it easy to insert text using a non-XML aware text editor, perhaps inserting a single space as the element value would do the trick.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
<deployment retail="true"> clarification jsymons BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 October 1st, 2009 02:48 PM
<authentication mode="Forms"/> msman88 ASP.NET 3.5 Professionals 10 August 30th, 2009 08:57 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
HELP HELP ODBC<->ASP <-> XML moon Wrox Book Feedback 1 November 9th, 2003 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.