[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
I'm not following this, below
At 09:45 AM 2/15/2006, David Carlisle wrote:
But this is really the design I have:
So when I run this in Stylus or saxon I get the results that I expect:
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
voice: 510-522-4703
"It is easier to pose nature and less trouble to please."
http://www.portalwisconsin.org/bennett_feature.cfm
Re: [xsl] Finding and processing index terms
Subject: Re: [xsl] Finding and processing index terms From: Dan Vint <dvint@xxxxxxxxx> Date: Wed, 15 Feb 2006 11:12:43 -0800 |
I'm not following this, below
At 09:45 AM 2/15/2006, David Carlisle wrote:
To see the difference, consider <a> <x a="n"/> <x/> </a>
But this is really the design I have:
<?xml version="1.0"?> <!DOCTYPE a [ <!ELEMENT a (x*) > <!ELEMENT x EMPTY >
<!ATTLIST x a CDATA "y" >
]> <a> <x a="n"/> <x/> </a>
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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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'])"/> </xsl:template>
</xsl:stylesheet>
$ 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 http://www.dvint.com
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."
http://www.portalwisconsin.org/bennett_feature.cfm
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Finding and processing in, David Carlisle | Thread | Re: [xsl] Finding and processing in, David Carlisle |
RE: [xsl] Retrieving data from two , cknell | Date | RE: RE: [xsl] Finding and processin, Dan Vint |
Month |