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. Advertising

  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. Advertising

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. Stylus Studio
    Replies:
    0
    Views:
    700
    Stylus Studio
    Aug 3, 2004
  2. kevin bailey

    conditional formatting in XSLT

    kevin bailey, Aug 13, 2003, in forum: XML
    Replies:
    0
    Views:
    1,257
    kevin bailey
    Aug 13, 2003
  3. Replies:
    4
    Views:
    684
  4. Replies:
    18
    Views:
    2,768
    Joseph Kesselman
    Oct 4, 2006
  5. cp
    Replies:
    2
    Views:
    403
Loading...

Share This Page