xml -> xslt -> xhtml, browser-side not rendering, put in pre tags.

Discussion in 'XML' started by bram.labarque@gmail.com, Jul 5, 2006.

  1. Guest

    Hello all,
    The parsing should happen at the browser. I have three files:

    1) Initial file: xml with some data and a pointer to an xsl.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="Test05_Base.xsl"?>
    <employee>
    <surname>Philips</surname>
    <rgn>R</rgn>
    </employee>

    2) the xsl which in turn reads the xhtml.

    <xsl:template match="/">
    <xsl:value-of disable-output-escaping="yes"
    select="document('Test05_BaseLoggedOff.xhtml')/." />
    </xsl:template>

    3) the xhtml.

    The parsing does take place but the html-elements from the xhtml are
    not copied along.
    I only see the text which is inside the xhtml. All the text from the
    xhtml seems to be put inside a pre tag. I did't put it there.
    Btw that pre tag also has a id="transformiixResult" attribute (from
    firefox?).
    How do i copy the tags from the xhtml along with the text and avoid the
    pre tag?

    Can somebody help? Thanks a lot.
    Greetings, Bram.
     
    , Jul 5, 2006
    #1
    1. Advertising

  2. Re: xml -> xslt -> xhtml, browser-side not rendering, put in pretags.

    wrote:


    > 2) the xsl which in turn reads the xhtml.
    >
    > <xsl:template match="/">
    > <xsl:value-of disable-output-escaping="yes"
    > select="document('Test05_BaseLoggedOff.xhtml')/." />


    Mozilla/Firefox do not support disable-output-escaping="yes", that is
    only an optional feature according to the XSLT spec.

    > The parsing does take place but the html-elements from the xhtml are
    > not copied along.


    xsl:value-of gives you the string value. You might be looking for
    xsl:copy-of.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jul 5, 2006
    #2
    1. Advertising

  3. Guest

    Martin Honnen wrote:
    > Mozilla/Firefox do not support disable-output-escaping="yes", that is
    > only an optional feature according to the XSLT spec.

    Ah ok. I saw somebody mentioning it and just copied it. No better
    result.

    >
    > > The parsing does take place but the html-elements from the xhtml are
    > > not copied along.

    >
    > xsl:value-of gives you the string value. You might be looking for
    > xsl:copy-of.

    I had earlier tried that:
    <xsl:template match="/">
    <xsl:copy-of select="document('Test05_BaseLoggedOff.xhtml')/." />
    </xsl:template>
    But it results in the same page, text inside pre tags, no html tags.
    Maybe i should use it differently?
    Greetings, Bram.
     
    , Jul 5, 2006
    #3
  4. Re: xml -> xslt -> xhtml, browser-side not rendering, put in pretags.

    wrote:

    > Martin Honnen wrote:
    >
    >>Mozilla/Firefox do not support disable-output-escaping="yes", that is
    >>only an optional feature according to the XSLT spec.

    >
    > Ah ok. I saw somebody mentioning it and just copied it. No better
    > result.


    No better result? Firefox does not support disable-output-escaping so if
    you rely on that you won't get a result.



    > I had earlier tried that:
    > <xsl:template match="/">
    > <xsl:copy-of select="document('Test05_BaseLoggedOff.xhtml')/." />
    > </xsl:template>
    > But it results in the same page, text inside pre tags, no html tags.



    Here is a simple example that works for me (tested with Firefox 1.5 and
    Mozilla 1.7):
    <http://home.arcor.de/martin.honnen/xslt/test2006070502.xml>

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jul 5, 2006
    #4
  5. Guest

    Martin Honnen wrote:
    >
    > Here is a simple example that works for me (tested with Firefox 1.5 and
    > Mozilla 1.7):
    > <http://home.arcor.de/martin.honnen/xslt/test2006070502.xml>


    It indeed works nice. There are several differences, i'll have a better
    look at at it tomorrow. Btw it also works on MSIE.
    Thank you very much.
    Greetings, Bram.
     
    , Jul 5, 2006
    #5
  6. Guest

    Martin Honnen wrote:
    > wrote:


    > Here is a simple example that works for me (tested with Firefox 1.5 and
    > Mozilla 1.7):
    > <http://home.arcor.de/martin.honnen/xslt/test2006070502.xml>
    >

    Hello Martin,

    The error was in my xsl: i had written <xsl:eek:utput method="text" />
    instead of <xsl:eek:utput method="xml" />.

    Thanks again.
    Greetings, Bram.
     
    , Jul 6, 2006
    #6
    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. Rocky Moore
    Replies:
    7
    Views:
    1,744
    mikeb
    Jan 14, 2004
  2. Luke Dalessandro
    Replies:
    4
    Views:
    919
    Luke Dalessandro
    Sep 24, 2004
  3. Replies:
    0
    Views:
    464
  4. Usha2009
    Replies:
    0
    Views:
    1,139
    Usha2009
    Dec 20, 2009
  5. Leonardo Constantino

    Rendering extra tags inside an XHTML-MP <head> tag

    Leonardo Constantino, Aug 8, 2004, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    148
    Leonardo Constantino
    Aug 8, 2004
Loading...

Share This Page