Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Query with subelements inside words [Thread Next] Re: Query with subelements inside wordsTo: NULL Date: 6/1/2005 3:59:00 AM Problem solved. My XQuery implementation was/is buggy. Saxon returns the correct result if fed fn:string(/root/elemt) regards, Diz. dizzyhaze@g... wrote: > Here is a sample of the kind of XML I'm working with: > > <root> > <elemt>Something is ro<lig>tt</lig>en in the state of > <emph>Den</emph>mark</elemt> > </root> > > I would like to be able to extract the contents of <elemt> as a string > without the subelements and with the integrity of the words > unaffected...for example: > > <result> > Something is rotten in the state of Denmark > </result> > > I have tried various approaches with XQuery along the lines of... > > for $TheResult in (/root/elemt) return normalize-space($TheResult) > > ...but the best I've been able to do is this: > > <result> > Something is ro tt en in the state of Den mark > </result> > > As you can see, spaces are being inserted in undesirable locations. > > Any ideas as to how I can make this work in XQuery? > > thanks > Diz. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
