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

Re: Re: how to get string value of element node withou

Subject: Re: Re: how to get string value of element node without children concatenated
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 14 Mar 2003 23:37:29 +0100
get string from xml
"Niko Matsakis" <niko@xxxxxxxxxxxxx> wrote in message
news:3E725111.5010702@xxxxxxxxxxxxxxxx
> While I agree that restructing the xml is best, the easiest option, as
> given by Michael Kay the last time this question was asked, is
>
> <xsl:copy-of select="text()"/>
>
> This not depend on what other templates you have in your stylesheet, it
> will always work, unlike <xsl:apply-templates select="text()"/>

Absolutely right!

I also proposed as a possible solution the use of

  <xsl:copy-of select="text()"/>

in my reply to Jeff.

It seems that many people would use xsl:value-of instead of xsl:copy-of.
This, of course, is not the solution, as it outputs only the first text-node
child.

It seems to me that the reason why people arrive at hurried conlusions like
this is because they use a concrete, very specific xml source document and
do not test their solution with other xml documents.

It would be extremely useful to have a test-data generator -- in this case a
generator of a series of xml documents that fit a particular DTD/Schema.
Also an automated testing environment, in which such generated test data is
continuously processed by the tested transformation and the results are
compared to the results that are required.

Does anybody know about any such tool?


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.