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

fragment in a variable

Subject: fragment in a variable
From: Jan Limpens <jan.limpens@xxxxxxxxx>
Date: Wed, 1 Dec 2004 20:15:12 -0200
xsl image src
hi,

I cannot explain to myself why this does not work....

	<xsl:template match="blog:Entry">
		<xsl:variable name="version">
			<xsl:choose>
				<xsl:when test="blog:Version[lang($selectedLanguage)]">
					<xsl:value-of select="blog:Version[lang($selectedLanguage)]"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="blog:Version[lang($defaultLanguage)]"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>

		<site:title>
			<xsl:value-of select="$version/blog:Title"/>
		</site:title>
		<site:description>
			<xsl:value-of select="$version/blog:Body/blog:Para[1]"/>
		</site:description>
		<xsl:if test="blog:Thumbnail/@src">
			<site:thumbnail>
				<xsl:value-of select="blog:Thumbnail/@src"/>
			</site:thumbnail>
		</xsl:if>
	</xsl:template>

throws "The expression passed to this method should result in a
NodeSet." (.NET processor)
what should I do?

a xml file would look like this...

<?xml version="1.0"?>
<Entry pubdate="2004-09-15T00:00:00" id="iEditoraComics"
xmlns="http://limpens.com/blogbase"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://limpens.com/blogbase Schemas/BlogBase.xsd">
	<Version xml:lang="en">
		<Title>Promo Comics</Title>
		<Body>
			<Para>IEditora, a Brazilian self-publishing house now promotes its
products using comics strips.</Para>
			<Para>Comics as a medium of advertisment is a quite unusual choice.
Still it brings many advantages and possibilities known only from tv
commercials to the much more affordable print medium.</Para>
		</Body>
	</Version>
	<Version xml:lang="pt">
		<Title>Quadrinhos de propaganda</Title>
		<Body>
			<Para>A editora paulistana IEditora me contratou de produzir uma
serie de quadrinhos sobre os seus servigos oferecidos.</Para>
		</Body>
	</Version>
	<Version xml:lang="de">
		<Title>Werbecomics</Title>
		<Body>
			<Para>IEditora, ein brasilianischer Verlag, beauftragte mich, eine
Serie von Comics zu produzieren, die ihr Angebot ins beste Licht
r|ckt.</Para>
		</Body>
	</Version>
	<Slideshow>
	<Image src="Images/Slideshows/iEditora/iEditora-Caesar.png">
		<ImageInfo xml:lang="en">
			<Title>Et In Editora Ego</Title>
			<Description>October 2004</Description>
		</ImageInfo>
	</Image>
	<Image src="Images/Slideshows/iEditora/IEditora-Promo-Comic-2-1.png">
		<ImageInfo xml:lang="en">
			<Title>The Importace Of Being Biographed</Title>
			<Description>September 2004</Description>
		</ImageInfo>
	</Image>
	<Image src="Images/Slideshows/iEditora/ieditora_promo-1.png">
		<ImageInfo xml:lang="en">
			<Title>The Hell Of Being Unpublished</Title>
			<Description>January 2004</Description>
		</ImageInfo>
	</Image>
	</Slideshow>
	<Thumbnail src="/Images/Thumbnails/teaser_ieditora_promo.png"/>
</Entry>

thanks a lot!
--
Jan
http://www.limpens.com

Otakoo Saloon Cartoon - newest episode at http://limpens.com/oscredirect

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.