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

RE: Difference between <when>x</when> and <when><text

Subject: RE: Difference between <when>x</when> and <when><text>x</text></when>
From: "Markus Karg" <karg@xxxxxxxxx>
Date: Sun, 21 Mar 2010 08:30:02 +0100
RE:  Difference between <when>x</when> and  <when><text
Hermann,

thanks a lot for this tip!

In fact you might ask yourself why I need it. The reason is: Actually I had
<when>x</when>, but Eclipse (even the latest one) reformats it by instering
breaks when using "Source > Format"...

Thanks!
Markus

> -----Original Message-----
> From: Hermann Stamm-Wilbrandt [mailto:STAMMW@xxxxxxxxxx]
> Sent: Samstag, 20. Mdrz 2010 16:22
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Difference between <when>x</when> and
> <when><text>x</text></when>
>
> Markus,
>
> if yo want to remove the spaces for all <when> and <otherwise> entries
> you
> can
> do this by having the complete <choose> inside a <xsl:variable> and
> then
> call
> normalize-space() once afterwards:
>
> <xsl:variable name="v">
>   <xsl:choose>
>     <xsl:when test="sometest1">
>       x1
>     </xsl:when>
>     <xsl:when test="sometest2">
>       x2
>     </xsl:when>
>     ...
>     <xsl:when test="sometestn">
>       xn
>     </xsl:when>
>     <xsl:otherwise test="sometest">
>       x
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:variable>
>
> <xsl:value-of select="normalize-space($v)"/>
>
>
> Mit besten Gruessen / Best wishes,
>
> Hermann Stamm-Wilbrandt
> Developer, XML Compiler, L3
> WebSphere DataPower SOA Appliances
> ----------------------------------------------------------------------
> IBM Deutschland Research & Development GmbH
> Vorsitzender des Aufsichtsrats: Martin Jetter
> Geschaeftsfuehrung: Dirk Wittkopp
> Sitz der Gesellschaft: Boeblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
>
>
>
>              "Markus Karg"
>              <karg@xxxxxxxxx>
>
> To
>              03/19/2010 08:37          <xsl-
> list@xxxxxxxxxxxxxxxxxxxxxx>
>              AM
> cc
>
>
> Subject
>              Please respond to         RE:  Difference between
>              xsl-list@xxxxxxxx         <when>x</when> and
>               lberrytech.com           <when><text>x</text></when>
>
>
>
>
>
>
>
>
>
>
> > Markus Karg wrote:
> >
> > > But actually I meant: Is there a way how I can tell this *once* at
> > the
> > > <choose> or the <stylesheet> level, instead of rewriting all my
> > <when>s?
> >
> > No, I don't think so, there is no
> >    xml:space="normalize"
> > or similar value defined that could achieve that.
>
> Anyways, thanks a lot! :-)
> Markus

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.