[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] tag with one blank body


Subject: RE: [xsl] tag with one blank body
From: Bartolomeo Nicolotti <bnicolotti@xxxxxxxxx>
Date: Tue, 05 Jan 2010 16:49:59 +0100

Hello,

I've debugged and in the xml string immediately after apply xslt there's

<QCat> </QCat>

both with

<xsl:text> </xsl:text>
and 
<xsl:text>&#20;</xsl:text>

the problem is in xmlbean.parse method after which the parsed object
result in:

<QCat></QCat>

Many thanks

Best regards


Il giorno mar, 05/01/2010 alle 13.07 +0000, Michael Kay ha scritto:
> > I've the need to generate in the output xml this tag with 
> > exactly one space inside the body:
> > 
> > <QCat> </QCat>
> > 
> > I've tried this in the xstl:
> > 
> > <QCat><!-- DataType: Alphanumeric 
> >                              Length: 2 
> >                              Left justified. Blank fill if not used 
> >                              --><xsl:value-of select=' '/></QCat>
> 
> That should give you a syntax error. The select attribute must contain an
> XPath expression. But select="' '" should work.
> > 
> > and this
> > 
> > <QCat><!-- DataType: Alphanumeric 
> >                              Length: 2 
> >                              Left justified. Blank fill if not used 
> >                              --><xsl:text> </xsl:text></QCat>
> > 
> 
> This should work. If it doesn't, there's something odd going on. Perhaps
> you're parsing the stylesheet using the Microsoft XML parser which is a bit
> cavalier in throwing out whitespace? If that's the case, see if
> <xsl:text>&#x20;</xsl:text> works.
> 
> Or perhaps the XSLT stylesheet is generating the space and you're not seeing
> it because of how you view the output?
> 
> Regards,
> 
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay 
> 
-- 
____________________________________________________________
Bartolomeo Nicolotti - Reparto Sviluppo - SIAP s.r.l.
Via Sant'Albano, 13 - 12049 TrinitC  (CN) Italy
Tel. (+39) 0172 652511 - Fax (+39) 0172 652519
E-mail: bnicolotti@xxxxxxxxx - URL: www.siapcn.it
Codice Fiscale, Partita IVA, Iscr. Reg. Imprese di Cuneo: 01871320048
Capitale Sociale: b, 99.000,00 i.v. - R.E.A. CN 141311
____________________________________________________________

Le informazioni contenute nella presente comunicazione e i relativi
allegati possono essere riservate e sono, comunque, destinate
esclusivamente alle persone o alla SocietC  sopraindicati. La
comunicazione, diffusione, distribuzione e/o copiatura del documento
trasmesso nonchC) qualsiasi forma di trattamento dei dati ivi contenuti
da parte di qualsiasi soggetto diverso dal destinatario C( proibita, sia
ai sensi dell'art. 616 c.p., che ai sensi del D. Lgs. n. 196/2003, ed in
ogni caso espressamente inibita. Se avete ricevuto questo messaggio per
errore, vi preghiamo di distruggerlo e di informarci immediatamente per
telefono allo 0172/652511 o inviando un messaggio all'indirizzo:
info@xxxxxxxxx
____________________________________________________________

This electronic mail transmission, including any accompanying documents
or attachments, may contain information that is confidential,
privileged, proprietary, or otherwise legally exempt from disclosure and
it's intended solely for the addressee(s).  Access to this Internet
electronic mail message by anyone else is unauthorized.  If you are not
the intended recipient, any disclosure, copying, distribution or any
action taken or omitted to be taken in reliance on it is prohibited and
may be unlawful. If you have received this electronic mail erroneously,
we ask you to to destroy it and let us know immediately by phone
at 0172/652511 or by sending an e-mail at info@xxxxxxxxx 
____________________________________________________________


Current Thread
Keywords