XSLT xml to xml simple question about formatting

Discussion in 'XML' started by kbozek@yahoo.com, Jun 7, 2007.

  1. Guest

    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
     
    , Jun 7, 2007
    #1
    1. Advertisements

  2. 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
     
    Joseph Kesselman, Jun 7, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    1
    Views:
    402
    Michael Pearson
    Jan 3, 2004
  2. The Eeediot

    Simple formatting question...

    The Eeediot, Nov 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    422
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Nov 22, 2004
  3. Stylus Studio
    Replies:
    0
    Views:
    979
    Stylus Studio
    Aug 3, 2004
  4. Replies:
    4
    Views:
    950
  5. jkflens
    Replies:
    2
    Views:
    1,719
    jkflens
    May 30, 2006
  6. Replies:
    18
    Views:
    3,027
    Joseph Kesselman
    Oct 4, 2006
  7. cp
    Replies:
    2
    Views:
    501
  8. Erik Wasser
    Replies:
    5
    Views:
    816
    Peter J. Holzer
    Mar 5, 2006
Loading...