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

Re: filtering XML file using starts-with

Subject: Re: filtering XML file using starts-with
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Thu, 18 Dec 2003 16:43:10 -0800
janet gazlay martin
Dan,
I can see a problem in your XML.Its not a problem  If its a typo . Your XML
is not well formed because you have missspelt <value> as <va!lue>
I am putting *** around where I think you have misspelt
<?xml version="1.0"?>
<Sales><Summary><Employee><value>Gazlay-Martin,
Janet</value></Employee><Module><value>101</value></Module><ResignTotalQuota
><value>8686333</value></ResignTotalQuota><NewTotalQuota><value>263844006.92
5</value></NewTotalQuota><StrategicTotalQuota><value>60794058.915</value></S
trategicTotalQuota><TotalTotalQuota><value>272530339.925</value></TotalTotal
Quota><NewBucketQuota><value>0</value></NewBucketQuota><ResignTotalObjective
><value>0</value></ResignTotalObjective><NewTotalObjective><value>181000000<
/value></NewTotalObjective><NewBucketObjective><value>0</value></NewBucketOb
jective><StrategicTotalObjective><value>18100000</value></StrategicTotalObje
ctive><TotalTotalObjective><value>181000000</value></TotalTotalObjective><Pe
rcentResignTotal><value>0</value></PercentResignTotal><PercentNewTotal><valu
e>145.77</value></PercentNewTotal><PercentStrategicTotal><value>335.87</valu
e></PercentStrategicTotal><PercentTotalTotal><value>150.56</value></PercentT
otalTotal><PercentNewBucket>
***<va!
lue>0</value></PercentNewBucket><JobTitleCode><value>BSEM</value></JobTitleC
ode><MarketSegmentCode><value>1</value></MarketSegmentCode><RowCounter><valu
e>368</value></RowCounter></Summary>

If it is an exact copy then it is wrong ....try to change and see. It should
normally get you an exception if the XML is not wellformed

Hope this helps
Vasu
----- Original Message -----
From: "Dan" <dan@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, December 18, 2003 8:12 AM
Subject: Re:  filtering XML file using starts-with


> You are exactly right about the pretty print and I suspect right about the
rest.  However, I am still getting no results back.  Here is the exact XML
copied from notepad this time:
>
> <?xml version="1.0"?>
> <Sales><Summary><Employee><value>Gazlay-Martin,
Janet</value></Employee><Module><value>101</value></Module><ResignTotalQuota
><value>8686333</value></ResignTotalQuota><NewTotalQuota><value>263844006.92
5</value></NewTotalQuota><StrategicTotalQuota><value>60794058.915</value></S
trategicTotalQuota><TotalTotalQuota><value>272530339.925</value></TotalTotal
Quota><NewBucketQuota><value>0</value></NewBucketQuota><ResignTotalObjective
><value>0</value></ResignTotalObjective><NewTotalObjective><value>181000000<
/value></NewTotalObjective><NewBucketObjective><value>0</value></NewBucketOb
jective><StrategicTotalObjective><value>18100000</value></StrategicTotalObje
ctive><TotalTotalObjective><value>181000000</value></TotalTotalObjective><Pe
rcentResignTotal><value>0</value></PercentResignTotal><PercentNewTotal><valu
e>145.77</value></PercentNewTotal><PercentStrategicTotal><value>335.87</valu
e></PercentStrategicTotal><PercentTotalTotal><value>150.56</value></PercentT
otalTotal><PercentNewBucket><va!
>
lue>0</value></PercentNewBucket><JobTitleCode><value>BSEM</value></JobTitleC
ode><MarketSegmentCode><value>1</value></MarketSegmentCode><RowCounter><valu
e>368</value></RowCounter></Summary>
>
> And here is the for-each line I am using
>
> <xsl:for-each select="Sales/Summary[starts-with(Module/value,'10')]">
>
> Thanx for your help, do you ahve a book recomendation BTW?
>
> ---------- Original Message ----------------------------------
> From: David Carlisle <davidc@xxxxxxxxx>
> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date:  Thu, 18 Dec 2003 15:44:39 GMT
>
> >
> > - <Module>
> >  <value>101</value>
> >  </Module>
> >
> >You posted an IE6 "pretty print" view of the file (I would guess)
> >not your real input.
> >
> >which means I'm still lacking information, however if the source
> >does really look like that (without the "-") then the string value of
> >Module is
> >newline space space 1 0 1 newline space space
> >so doesn't start with "10"
> >
> >You probably want (starts-with(Module/value,'10')
> >
> >--
> >http://www.dcarlisle.demon.co.uk/matthew
> >
> >________________________________________________________________________
> >This e-mail has been scanned for all viruses by Star Internet. The
> >service is powered by MessageLabs. For more information on a proactive
> >anti-virus service working around the clock, around the globe, visit:
> >http://www.star.net.uk
> >________________________________________________________________________
> >
> > XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

 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.