Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT xml to xml simple question about formatting

Reply
Thread Tools

XSLT xml to xml simple question about formatting

 
 
kbozek@yahoo.com
Guest
Posts: n/a
 
      06-07-2007
I have an XSLT transform that will create an XML to XML transformation
in the parent child format.

I really want to output the elements and attributes on a single line
such as:

<image name="car.jpg" size="5000" /><image type = "jpg" compression =
"20" />
....
....
<image name="talk.jpg" size="15000" /><image type = "jpg" compression
= "11" />
....
....

Yet, fooling around with the xsl:elements and xsl:attribute does not
quite get me there. Perhaps I am misunderstanding something in the
descriptions of elements and attributes. I've tried searching for the
answer but have come up blank so far.

Thanks.
Keith

 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      06-07-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I really want to output the elements and attributes on a single line


Should be simple: Make sure you don't output any text nodes, and don't
turn on indendataion.

I'd bet you're inadvertantly copying whitespace from the source
document. But since you didn't show us an example that demonstrates the
problem, I can't tell you how to fix it.

Note that you shouldn't have to use xsl:element and xsl:attribute in
most cases...


--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting XML with an XSLT without access to the XML cp XML 2 08-20-2007 06:50 PM
XSLT question: How to lookup another tag's children in XSLT yinglcs@gmail.com XML 18 10-03-2006 11:22 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Including XSLT/XML document within a XSLT document dar_imiro@hotmail.com XML 4 12-13-2005 02:26 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM



Advertisments