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

Re: Finding and processing index terms

Subject: Re: Finding and processing index terms
From: Dan Vint <dvint@xxxxxxxxx>
Date: Wed, 15 Feb 2006 11:12:43 -0800
Re:  Finding and processing index terms
I'm not following this, below

At 09:45 AM 2/15/2006, David Carlisle wrote:
To see the difference, consider
<x a="n"/>

But this is really the design I have:

<?xml version="1.0"?>
<!ELEMENT a  (x*) >

          a  CDATA   "y" >

<x a="n"/>

Then ask for all the children of x that don't have an attribute that is 'y'
(or the different question, have an a attribute that is not 'y')

<xsl:stylesheet version="1.0"

<xsl:template match="a">
a: <xsl:value-of select="count(*[@a!='y'])"/>
b: <xsl:value-of select="count(*[not(@a='y')])"/>
c: <xsl:value-of select="count(*[string(@a)!='y'])"/>


$ saxon neq.xml neq.xsl
<?xml version="1.0" encoding="utf-8"?>
a: 1
b: 2
c: 2

So when I run this in Stylus or saxon I get the results that I expect:

a: 1
b: 1
c: 1

I agree this is an issue if the DTD did not exist, but it does and the default values are there just like if they were typed in the data stream.

SO I don't see this as so much a warning against != as it is being aware of the environment your processing in - unless I missed something.
Danny Vint

Specializing in Panoramic Images of California and the West

voice: 510-522-4703

When H.H. Bennett was asked why he preferred to be out
shooting landscapes rather than spending time in his portrait studio:

"It is easier to pose nature and less trouble to please."


Current Thread


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.
First Name
Last Name
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.