[XML][XSLT] Embeded HTML...

Discussion in 'XML' started by =?ISO-8859-1?Q?St=E9phane_Toussaint?=, May 16, 2005.

  1. Hi,

    I'm always in trouble when trying to render this :

    <doc>
    <author>myself</author>
    <subject>foo</subject>
    <body><h1>Hello,</h1><p>bla <b>bar</b></p></body>
    </doc>

    I want to convert this XML doc in an HTML page by using XSLT.
    The problem is about how to render the body node.

    Because I want the body to be display as it is, i'm trying to do this by
    this way :

    <xsl:copy-of select="body"/>

    But the problem is that spaces between nodes are not displayed. As a
    result :

    Hello,
    bla*bar*

    And not :
    Hello,
    bla *bar*

    I'm trying to do all this in Java with the dom4j lib.

    Thank you.

    Steph
     
    =?ISO-8859-1?Q?St=E9phane_Toussaint?=, May 16, 2005
    #1
    1. Advertising

  2. =?ISO-8859-1?Q?St=E9phane_Toussaint?=

    Peter Flynn Guest

    Stéphane Toussaint wrote:

    > Hi,
    >
    > I'm always in trouble when trying to render this :
    >
    > <doc>
    > <author>myself</author>
    > <subject>foo</subject>
    > <body><h1>Hello,</h1><p>bla <b>bar</b></p></body>
    > </doc>
    >
    > I want to convert this XML doc in an HTML page by using XSLT.
    > The problem is about how to render the body node.
    >
    > Because I want the body to be display as it is, i'm trying to do this by
    > this way :
    >
    > <xsl:copy-of select="body"/>
    >
    > But the problem is that spaces between nodes are not displayed. As a
    > result :
    >
    > Hello,
    > bla*bar*
    >
    > And not :
    > Hello,
    > bla *bar*


    Saxon produces:

    <body>
    <h1>Hello,</h1>
    <p>bla <b>bar</b></p>
    </body>

    > I'm trying to do all this in Java with the dom4j lib.


    I think your software is broken.

    ///Peter
    --
    sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
    &;top"
     
    Peter Flynn, May 27, 2005
    #2
    1. Advertising

  3. Peter Flynn wrote:
    > Stéphane Toussaint wrote:


    > Saxon produces:
    >
    > <body>
    > <h1>Hello,</h1>
    > <p>bla <b>bar</b></p>
    > </body>
    >
    >>I'm trying to do all this in Java with the dom4j lib.

    >
    > I think your software is broken.


    It's seems that is fix with last dom4j release... cool

    >
    > ///Peter


    Thanks

    Steph
     
    =?UTF-8?B?U3TDqXBoYW5lIFRvdXNzYWludA==?=, Jun 3, 2005
    #3
    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:
    764
    Stylus Studio
    Aug 3, 2004
  2. Replies:
    2
    Views:
    407
    Roberto Nunnari
    Mar 5, 2004
  3. =?Utf-8?B?U2xlYXp5?=

    XmlDataSource and embeded HTML within your XML data

    =?Utf-8?B?U2xlYXp5?=, Jun 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    373
    Walter Wang [MSFT]
    Jun 21, 2006
  4. King Coffee

    writing embeded HTML

    King Coffee, Oct 21, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    250
    King Coffee
    Oct 21, 2008
  5. Zhan feng Wang
    Replies:
    5
    Views:
    148
    Lloyd Linklater
    Aug 6, 2007
Loading...

Share This Page