Preserving entities?

Discussion in 'XML' started by D. Alvarado, May 16, 2004.

  1. D. Alvarado

    D. Alvarado Guest

    Hi,
    I cannot seem to preserve my XML entities when I transform to HTML.
    For example, I want to transform a document containing

    ā

    and I would like that exact string to appear in
    the resulting HTML. Unfortunately, during the
    XML -> HTML, the "ā" gets
    converted to an actual character. When I tried using

    <![CDATA[ā]]>

    the following was in the HTML file

    &amp;#257;

    What is your advice regarding how to preserve
    these entities?

    Much thanks, - Dave
     
    D. Alvarado, May 16, 2004
    #1
    1. Advertising

  2. In article <>,
    D. Alvarado <> wrote:

    % For example, I want to transform a document containing
    %
    % ā
    %
    % and I would like that exact string to appear in
    % the resulting HTML.

    Try adding

    encoding='ISO-8859-1'

    as an attribute of the xsl:eek:utput element.



    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, May 16, 2004
    #2
    1. Advertising

  3. "D. Alvarado" <> wrote in message
    news:...
    > Hi,
    > I cannot seem to preserve my XML entities when I transform to HTML.
    > For example, I want to transform a document containing
    >
    > ā
    >
    > and I would like that exact string to appear in
    > the resulting HTML. Unfortunately, during the
    > XML -> HTML, the "ā" gets
    > converted to an actual character. When I tried using
    >

    Dave,

    In your xsl:text or xsl:value-of that is actually writing out the value
    in question, add the following attribute : disable-output-escaping="yes".

    Regards,
    Kenneth
     
    Kenneth Stephen, May 17, 2004
    #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. Jeremy Phillips
    Replies:
    1
    Views:
    451
    Jürgen Exner
    Jul 23, 2004
  2. Jeremy Phillips
    Replies:
    2
    Views:
    424
  3. TTroy
    Replies:
    16
    Views:
    795
    Peter Nilsson
    Jan 31, 2005
  4. Replies:
    4
    Views:
    536
  5. Jim Higson
    Replies:
    3
    Views:
    227
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page