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

RE: XPath count function in JavaScript

Subject: RE: XPath count function in JavaScript
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Thu, 06 May 2004 09:40:12 +0000
javascript count
Hi Tomas,

The parser does not count whitespace text that is between elements.

You would need something like:
<xsl:text>
</xsl:text>
in the xsl to create a newline.

Perhaps having:
<Cv>Har arbetat som konsult hos microsoft sedan barnsben
</Cv>
Is enough.

The default templates do not automatically create newlines between each time they are invoked (nor do any other template unless where told to).

Regards,
Ragulf Pickaxe :)


ok


I do like that now, but then another problem appeard.

my xsl is now like this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:variable name="fnamn-count" select="count(//*[@fnamn='Tomas'])"/>
</xsl:stylesheet>


and my xml doc:
<Katalog>
  <Person fnamn="Tomas" enamn="Olsson" tfn="026-789536">
    <Adress adress="Norrav. 34" postnr="50623" postort="Soderhamn"/>
    <Cv>Har arbetat som konsult hos microsoft sedan barnsben</Cv>
  </Person>
  <Person fnamn="Tomas" enamn="Orre" tfn="026-782576">
    <Adress adress="Sodrav. 34" postnr="50323" postort="Gavle"/>
    <Cv>Har arbetat som stadare hos ericsson</Cv>
  </Person>
.
.
.

when I use xml.transformNode(xsl) the result will be a list with the Cv- text,
like:
Har arbetat som konsult hos microsoft sedan barnsbenHar arbetat som stadare hos
ericsson....


What is wrong?

/Tomas


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


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.