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

RE: suppression of the transformation of character entities in


single quote hex
Yes, ’ is an old HTML character reference for a single quote, but when
you process ’ with XSLT, it is using an XML processor and it does not
see a single quote but the Unicode character 0092 (dec equiv 146), a C1
control character. ’ will display differently in Opera, Mozilla, IE,
etc. If you are running anything through a compliant XML processor, I would
recommend that you use Unicode character references in hex (or by converting
the hex to decimal) for more consistent results. Avoid the old HTML
character entities as they are called.

What XSLT processor do you use? If we know that, we can help track down what
is happening with your results.

Mike

> -----Original Message-----
> From: Sascha Pogacar (XPECT MEDIA)
> [mailto:sascha.pogacar@x...]
> Sent: Thursday, May 22, 2003 11:39 AM
> To: xml-dev
> Subject: AW:  suppression of the transformation of character
> entities in XSLT?
>
>
> Mike,
>
> ’ decimal supposes to be the right single quotation mark, which
> comes up nicely, when you put it directly into an html <div>.
> This is for an informationterminal with locally stored xmlfiles and
> clientsided datamanagement, which works very well usually.
>
> My problem is that i get the right xml and that i have to transform it,
> where im using xslt and after this transformation i have the transformed
> characters in the xml, which i cant use anymore as representation in the
> browser.
>
> best
>
> Sascha Pogacar
>
> XPECT MEDIA Communication GmbH
> Kölnische Strasse 4
> D-34117 Kassel
>
> eMail mailto:sascha.pogacar@x...
> web http://www.xpect-media.de
>
> phone...office. +49 (0)561 70 16 44 -0
> phone...direct. +49 (0)561 70 16 44 -2
> fax............ +49 (0)561 70 16 44 -9
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Mike Fitzgerald [mailto:mike@w...]
> > Gesendet: Donnerstag, 22. Mai 2003 19:00
> > An: Sascha Pogacar (XPECT MEDIA); xml-dev
> > Betreff: RE:  suppression of the transformation of
> > character entities in XSLT?
> >
> >
> > Sascha,
> >
> > Hmmmmm. &#146; (decimal) and &#x92; (hex equivalent) is the
> > C1 control character PU2 (Private Use 2). Is that really what
> > you want?
> >
> > Also, just to clarify: do you want the character refs
> > preserved in the result of the transformation?
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: Sascha Pogacar (XPECT MEDIA)
> > > [mailto:sascha.pogacar@x...]
> > > Sent: Thursday, May 22, 2003 9:20 AM
> > > To: xml-dev@l...
> > > Subject: AW:  suppression of the transformation of
> > character
> > > entities in XSLT?
> > >
> > >
> > > Due to some helpfull answeres, here some codeexamples to illustrate
> > > the process.
> > >
> > > 1. I have a big xml with movie informations and some other with
> > > theaterinformations and more. In the Movies.xml a part for the
> > > reviedata looks like this:
> > > 		<review>
> > > 			<P>Brad Gluckman is Malibu&#146;s most unwanted
> > > rapper. He spends his days hangin&#146; at the Malibrew Coffee Shop
> > > with his pimpin&#146; crew, Mocha, Monster and Hadji, and
> > bustin&#146;
> > > rhymes about his hard-core life up in &#147;the &#145;Bu.&#148;
> > > Immersed in hip-hop culture, B-Rad spits lyrics about his phat life
> > > and this beach boy is convinced that his wack rhymes are
> > tighter than
> > > Hadji&#146;s cornrows. While B-Rad thinks his lyrical stylings and
> > > hip-hop lifestyle are down, he&#146;s actually taking his
> > whole family
> > > down with him
> > > &#150; especially his father, Bill Gluckman, who is currently
> > > campaigning to be the next governor of California. Bill doesn&#146;t
> > > understand his son and thinks all B-Rad needs is some unusual family
> > > therapy--or tough love--to cure him of his gangsta
> > delusions. But ...
> > >
> > > 2. in the script i do some combinations and rearrangements with the
> > > informations i get. And then I give it to the xslt, which looks like
> > > this:
> > >
> > > <?xml version="1.0"?>
> > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > > version="1.0">
> > > 	<xsl:output method="xml" version="1.0" indent="yes" />
> > >
> > > 	<xsl:template match="root">
> > > 	<xsl:element name="root">
> > > 			<xsl:apply-templates select="movie"/>
> > > 			<xsl:apply-templates
> > > select="theaters|Theaters"/>
> > > 	</xsl:element>
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="theaters|Theaters">
> > > 	<xsl:element name="theaters">
> > > 			<xsl:apply-templates select="Theater|theater"/>
> > > 	</xsl:element>
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="theater|Theater">
> > > 	<xsl:element name="theater">
> > > 		<xsl:apply-templates select="@*|node()"/>
> > > 		<xsl:apply-templates
> > > select="/root/shows/showtime[@theater_id=current()/@TheaterId]"/>
> > > 	</xsl:element>
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="@TheaterId">
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="@fieldname">
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="@fn">
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="showtime">
> > > 			<xsl:apply-templates select="showtimes"/>
> > > 	</xsl:template>
> > >
> > > 	<xsl:template match="@*|node()">
> > > 		<xsl:copy>
> > > 			<xsl:apply-templates select="@*|node()"/>
> > > 		</xsl:copy>
> > > 	</xsl:template>
> > > </xsl:stylesheet>
> > >
> > > 3. Alter my transformation, the same content looks like this:
> > >
> > > <review>
> > > 			<P>Brad Gluckman is Malibu's most unwanted
> > > rapper. He spends his days hangin' at the Malibrew Coffee Shop with
> > > his pimpin' crew, Mocha, Monster and Hadji, and bustin'
> > rhymes about
> > > his hard-core life up in "the 'Bu." Immersed in hip-hop
> > culture, B-Rad
> > > spits lyrics about his phat life and this beach boy is
> > convinced that
> > > his wack rhymes are tighter than Hadji's cornrows. While
> > B-Rad thinks
> > > his lyrical stylings and hip-hop lifestyle are down, he's actually
> > > taking his whole family down with him - especially his father, Bill
> > > Gluckman, who is currently campaigning to be the next governor of
> > > California. Bill doesn't understand his son and thinks all
> > B-Rad needs
> > > is some unusual family therapy--or tough love--to cure him of his
> > > gangsta delusions. But when therapy can't solve the B-Rad public
> > > relations problem in time to stop Bill Gluckman's
> > disastrous slide in
> > > the polls, campaign manager Tom G...
> > >
> > > See my problem. Thanks for your help so far...
> > >
> > > best
> > >
> > > Sascha Pogacar
> > >
> > >
> > > -----------------------------------------------------------------
> > > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> > > initiative of OASIS <http://www.oasis-open.org>
> > >
> > > The list archives are at http://lists.xml.org/archives/xml-dev/
> > >
> > > To subscribe or unsubscribe from this list use the subscription
> > > manager: <http://lists.xml.org/ob/adm.pl>
> > >
> > >
> >
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
>


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.