OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   AW: [xml-dev] suppression of the transformation of character entities in

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: AW: [xml-dev] suppression of the transformation of character entities in XSLT?
  • From: "Sascha Pogacar (XPECT MEDIA)" <sascha.pogacar@xpect-media.de>
  • Date: Thu, 22 May 2003 18:20:10 +0200
  • Thread-index: AcMgeulygs6d3M28TzSIW3HBsCG9jgAAc+xw
  • Thread-topic: [xml-dev] 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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS