Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Query with subelements inside words

From: dizzyhaze@-----.---
To: NULL
Date: 6/1/2005 1:13:00 AM
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.



transparent
Print
Mail
Like It
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.

.
.

transparent

transparent