Altova Mailing List Archives


Re: Re: [xsl] Thought i knew this but i guess not

From: russurquhart1@-------.---
To: xsl-list@-----.------------.---
Date: 2/22/2011 10:20:00 PM
I used contains because filter could have the value filter="filter1,filter10,filter2" and i thought having a @filter='filter1' would fail for the previous string. If that is not the case, i'll change it, but i thought i tried that one time and it didn't work.


Thanks,


Russ

Feb 22, 2011 10:10:32 PM, xsl-list@l... wrote:


>
> Finally, I note that your test for your filter is brittle. 
> @filter='filter11' will pass. (And 'filter10' will pass for two 
> reasons.) The best fix to this depends on how you are using @filter.
>

 From the description of the problem, I think he wanted 
@filter='filter1' rather than contains(@filter, 'filter1'). It's a 
common mistake, people think of a node as "containing" a value and so 
reach for the contains() function without reading the spec to see what 
it does.

Michael Kay
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.