Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2010, 10:04 PM
Authorized User
 
Join Date: Jul 2010
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by samjudson View Post
If there is I shouldn't think it would be one that would affect you - i.e. it would be something like Maximum Integer (2,147,483,647 in 32 bit architecture).

When people ask questions like this however I always worry. Are you saying you have found a value that doesn't work? Are you saying you have written the whole XSLT template but don't have 2 minutes to try it out yourself? Or are you just being curious for the sake of it?
Well I have a string that can contain over 50,000 characters. I did create the xslt template and tried it out. Using smaller integers work great but I think I tried to use 100 or something and that's when it no longer worked. :(

It didn't error or anything just left the string as is without splitting it.
 
Old August 22nd, 2010, 01:06 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You're right, I've tried it myself and it doesn't appear to match for large values of n.

I can't find any reference to a limit in the spec, so it will likely depend on the some functionality within the processor implementation perhaps, which will likely be different for each implementation.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old September 1st, 2010, 11:09 AM
Authorized User
 
Join Date: Jul 2010
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

When I got rid of new line characters in my string within the CDATA section, I noticed that the analyze string finds matches for values that are larger than 100.
Is it because the analyze string finds matches on consecutive characters not including new line? So, if you use a value larger than the largest line length in your file you'll see no change?
Is it possible to parse the entire contents of a CDATA as a single string even with new line characters?
Any help is appreciated.
thanks,
 
Old September 1st, 2010, 11:17 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Put
flags="s"
on your xsl: analyze-string element to ensure that "." matches any character, including a linefeed.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
The Following User Says Thank You to Martin Honnen For This Useful Post:
ptn77 (September 1st, 2010)
 
Old September 1st, 2010, 12:03 PM
Authorized User
 
Join Date: Jul 2010
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

That worked! thanks so much!





Similar Threads
Thread Thread Starter Forum Replies Last Post
count occurrence of a character in a string surya Javascript How-To 6 May 7th, 2012 04:23 PM
Chapter 4 - Split View-Based App johnoeffinger BOOK: Beginning iPad Application Development 4 May 21st, 2010 05:43 PM
Count all occurences of a character in a string thomaz C# 2 February 9th, 2007 01:52 PM
Split field at designated character but at " " neo_jakey Classic ASP Professional 0 March 14th, 2005 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.