[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: converting XML to XML problem

Subject: Re: converting XML to XML problem
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 11 Nov 2003 17:50:53 -0500
ampersand xml problem
Abhi,

It's not whitespace inside the &_amp; entity, it's the whitespace between the output ampersand (an actual ampersand, when you have disabled output escaping) and the string that is to be the name of your newly constructed entity reference, that will be a problem.

Look at the code of your post this morning and you'll see that there is whitespace that will appear *after* your ampersand but *before* the value of the attribute representing the entity name:

<xsl:text disable-output-escaping="yes">
  &_amp;
</xsl:text>
<xsl:value-of select="@entity-name"/>

... the whitespace after the &_amp; and before the close </xsl:text> tag is what will get you.

Really all you have to do is to run the code you sent to the list this a.m. (which was much like above) exactly as given, and then try to parse the result. (This kind of fragility is one of several reasons why we frown on d-o-e-based approaches except as a last resort.)

Cheers,
Wendell

At 04:32 PM 11/11/2003, you wrote:
Hi Wendell,
Yes now I get what you were saying. But the white
space is before
"&amp;" and not as "&   amp;" so I do not see any
reason why

<xsl:text> &amp;</xsl:text> should not work the same
way as
<xsl:text>&amp;</xsl:text>.
The only thing that may happen is that there will be
an extra space in the output xml if I am correct.
Help me understand if you think I did not catch what
you are trying to say.
Thanks,
Abhi


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.