|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Searching within a text
It would be easier if your XML document used XML tagging for all its structure, rather than using a comma-delimited syntax internally. But if you must use this syntax, you can select the relevant elements using, say: <xsl:variable name="v" expr="normalize(animal/text())"/> <xsl:if test="starts-with($v,'cat,') or contains($v,',cat,') or ends-with($v,',cat')"> This assumes there are no embedded spaces. Mike Kay > > In my XML-file I have an enumeration of keywords in the animal-tag: > <person> > <animal> > cat,dog,bird,... > </animal> > </person> > <person> > <animal> > monkey,cat,mouse,... > </animal> > </person> > > Now I want to select those persons that have a certain > keyword, for example > cat,with an xsl-statement. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








