[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: tag with one blank body
Many thanks in the first solution you're right about the missing quote inside dobule quote, I wrote too fast and some quote remained in the keyboard... after applying xslt we have a string that we parse with xmlbeans object and than we print xmlbeans object to log file. In the log I see <QCat></QCat> You're right that the space may disappear in many points, I'll debug immediately after applying xslt. Many thanks Best regards Il giorno mar, 05/01/2010 alle 07.41 -0500, G. Ken Holman ha scritto: > At 2010-01-05 13:35 +0100, Bartolomeo Nicolotti wrote: > >I've a very stupid problem, but I've tried two ways without finding a > >solution. > > Your second one works for me ... your first one is missing something. > > >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> > > What you have above is an empty expression, not an expression for a > string of a single space. That would be: > > select="' '" > > or: > > select='" "' > > >and this > > > ><QCat><!-- DataType: Alphanumeric > > Length: 2 > > Left justified. Blank fill if not used > > --><xsl:text> </xsl:text></QCat> > > That should work without problem, and it does with my processor. > > >but both give > > > ><QCat></QCat> > > > >Any hints? > > How are you determining QCat is empty? Are you looking at the file > in its raw form, or are you perhaps opening the file in an XML editor > and the editor is for some reason thinking the element is empty and > presenting it as such? > > I hope this helps. > > . . . . . . . Ken > > T:\ftemp>xslt bartholomeo.xsl bartholomeo.xsl con > <?xml version="1.0" encoding="utf-8"?><result><QCat> </QCat> > > and this > > <QCat> </QCat></result> > T:\ftemp>type bartholomeo.xsl > <?xml version="1.0" encoding="US-ASCII"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="2.0"> > > <xsl:template match="/"> > <result> > <QCat><!-- DataType: Alphanumeric > Length: 2 > Left justified. Blank fill if not used > --><xsl:value-of select="' '"/></QCat> > > and this > > <QCat><!-- DataType: Alphanumeric > Length: 2 > Left justified. Blank fill if not used > --><xsl:text> </xsl:text></QCat> > </result> > </xsl:template> > </xsl:stylesheet> > T:\ftemp> > > -- > UBL and Code List training: Copenhagen, Denmark 2010-02-08/10 > XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 > XSLT/XQuery/XPath training: San Carlos, California 2010-04-26/30 > Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ > Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video > Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 > Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 > G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx > Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc > Legal business disclaimers: http://www.CraneSoftwrights.com/legal > -- ____________________________________________________________ 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 ____________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|