|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: CDATA elements in XSLT
At 2004-05-25 17:45 +0000, Dario Romero wrote:
I am using a xslt transformation on an xml file which has this structure (... this is only a subset): But it is already escaped such that a receiving application using an XML processor "sees" the ampersand as an ampersand. I also need to count on the number of characters for "America & Brownie" and not from "America & Brownie". Using the count() function counts the characters, not the markup, so you would get the answer 17 and not 21 for "America & Brownie". I have read about CDATA but doesn't seems to be the better solution. Could someone give me some advise on this ? Thank you. You are confusing what you see from what the application sees. You and I see markup, the applications see characters after the markup has been processed by the XML-aware application utilizing an XML processor. You probably don't have any problems at all and just think you have problems because you are seeing the markup. Another example, the count(x) function returns 4 for: <x>AT&T</x> I hope this helps. .................... Ken -- Public courses: Spring 2004 world tour of hands-on XSL instruction Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
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








