[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: size?
Larry, By "size()" of a "string datatype" do you mean the length of the string? in characters or bytes? It turns out that the notion of the "length" of a string is naturally and conveniently defined if you restrict yourself to single-byte character sets, but for multibyte character sets the notion of "length" is less well-defined. (for example, some character sets use a fixed number of bytes per character while others use a multiple number of bytes per character with some taking one byte and others taking 2 or three bytes). Many of these i18n issues are still under debate in various W3C working groups, so XSLT at the moment has resisted the need to define what a "character" means. Hence, there is no way to ask for the length of a string. That's also the reason why a substring is specified in terms of a delimiter string rather than an index. One can obviously imagine simple XSLT extension functions that, for a given set of internationalization assumptions which can be made for a certain application/site, would return the length() of a string, so it's not impossible, just not part of the standard. P.S. Maybe there is some guidance that PERL implementations could lend here if they have nailed this notion for multibyte languages in an unambiguous way, but I must admit that I'm not PERL-savvy enough to know. _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Dev't Team http://www.oracle.com/xml --- Begin Message ---
|
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
|