473,785 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Breaking up a long element

I'm using XSLT to convert an XML document into a text file for
processing on our mainframe. I've got everything working fine except
for one issue.

One of the elements returned can contain a large amount of data (2K+)
in size. Here's an example:

<jurisdictionss earched display="yes">A laska Courts,Arizona
Corrections,Ari zona Courts,Arkansas Courts,Californ ia Court
Index,Connectic ut Corrections,Con necticut Courts,Connecti cut Traffic
Court,District of Columbia Corrections,Flo rida Broward County,Florida
Corrections,Flo rida Duval County,Florida Palm Beach County,Florida
Pinellas County,Florida Suwannee County,Foreign National,Georgi a
Corrections,Ida ho Corrections,Ill inois Archived Corrections,Ill inois
Cook County,Illinois Corrections,Ind iana Corrections,Iow a
Corrections,Kan sas Corrections,Kan sas Sedgwick County,Kentucky
Corrections,Mai ne Corrections,Mic higan Corrections,Min nesota
Corrections,Min nesota Courts,Mississi ppi Corrections,Mis sissippi Hinds
County,Missouri Corrections,Mon tana Corrections,Mul ti-State Sex And
Violent Offender,Nebras ka Corrections,Nev ada Archived
Corrections,Nev ada Corrections,New Jersey Archived Corrections,New
Jersey Corrections,New Jersey Courts,New York Corrections,Nor th
Carolina Corrections,Nor th Carolina Courts,Ohio Corrections,Okl ahoma
Corrections,Ore gon Clackamas County,Oregon Columbia County,Oregon Coos
County,Oregon Corrections,Ore gon Deschutes County,Oregon Douglas
County,Oregon Hood County,Oregon Jackson County,Oregon Josephine
County,Oregon Klamath County,Oregon Lane County,Oregon Lincoln
County,Oregon Linn County,Oregon Marion County,Oregon Multnomah
County,Oregon Umatilla County,Oregon Washington County,Oregon Yamhill
County,Rhode Island Courts,South Carolina Corrections,Ten nessee
Corrections,Ten nessee Courts,Texas Courts,Texas Sex Offender
Registry,Utah Corrections,Uta h Courts,Virginia Courts,Virginia Fairfax
Circuit Court,Virginia Fairfax County Archived District Court,Virginia
Traffic Courts,Washingt on CLJ Courts,Washingt on Corrections,Was hington
Superior Courts,Wisconsi n Corrections,Wis consin
Courts</jurisdictionsse arched>

I'm not fluent in XML/XSLT so the way I work with stuff is pretty
basic. Is there a way to break this mass up into separate lines (CRLF
delimited) of a particular length, say 80 bytes long - could be 100,
256, whatever. Whether it breaks in the middle of a word doesn't
matter. Once it's broken up, I can rebuild it on the mainframe. The
line length is an issue. I'd like to keep it under 500 bytes if
possible.

Thanks,
Doug
Jul 20 '05 #1
1 1637


Doug wrote:
I'm using XSLT to convert an XML document into a text file for
processing on our mainframe. I've got everything working fine except
for one issue.

One of the elements returned can contain a large amount of data (2K+)
in size. Here's an example:

<jurisdictionss earched display="yes">A laska Courts,Arizona
Corrections,Ari zona Courts,Arkansas Courts,Californ ia Court
Index,Connectic ut Corrections,Con necticut Courts,Connecti cut Traffic
Court,District of Columbia Corrections,Flo rida Broward County,Florida
Corrections,Flo rida Duval County,Florida Palm Beach County,Florida
Pinellas County,Florida Suwannee County,Foreign National,Georgi a
Corrections,Ida ho Corrections,Ill inois Archived Corrections,Ill inois
Cook County,Illinois Corrections,Ind iana Corrections,Iow a
Corrections,Kan sas Corrections,Kan sas Sedgwick County,Kentucky
Corrections,Mai ne Corrections,Mic higan Corrections,Min nesota
Corrections,Min nesota Courts,Mississi ppi Corrections,Mis sissippi Hinds
County,Missouri Corrections,Mon tana Corrections,Mul ti-State Sex And
Violent Offender,Nebras ka Corrections,Nev ada Archived
Corrections,Nev ada Corrections,New Jersey Archived Corrections,New
Jersey Corrections,New Jersey Courts,New York Corrections,Nor th
Carolina Corrections,Nor th Carolina Courts,Ohio Corrections,Okl ahoma
Corrections,Ore gon Clackamas County,Oregon Columbia County,Oregon Coos
County,Oregon Corrections,Ore gon Deschutes County,Oregon Douglas
County,Oregon Hood County,Oregon Jackson County,Oregon Josephine
County,Oregon Klamath County,Oregon Lane County,Oregon Lincoln
County,Oregon Linn County,Oregon Marion County,Oregon Multnomah
County,Oregon Umatilla County,Oregon Washington County,Oregon Yamhill
County,Rhode Island Courts,South Carolina Corrections,Ten nessee
Corrections,Ten nessee Courts,Texas Courts,Texas Sex Offender
Registry,Utah Corrections,Uta h Courts,Virginia Courts,Virginia Fairfax
Circuit Court,Virginia Fairfax County Archived District Court,Virginia
Traffic Courts,Washingt on CLJ Courts,Washingt on Corrections,Was hington
Superior Courts,Wisconsi n Corrections,Wis consin
Courts</jurisdictionsse arched>

I'm not fluent in XML/XSLT so the way I work with stuff is pretty
basic. Is there a way to break this mass up into separate lines (CRLF
delimited) of a particular length, say 80 bytes long - could be 100,
256, whatever. Whether it breaks in the middle of a word doesn't
matter. Once it's broken up, I can rebuild it on the mainframe. The
line length is an issue. I'd like to keep it under 500 bytes if
possible.


XSLT/XPath works on characters not bytes. You can use XPath functions
like substring to break up a string into smaller parts.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

87
6472
by: Frances Del Rio | last post by:
is there a non-breaking hyphen in HTML?? for example, so a phone no. falls all on one line.. as in.. 1-800-444-5454... (and is not broken into two lines if phone no. occurs near end of a line..) (searched for 'hyphen' in FAQ pg, didn't find anything..) thank you.. Frances
27
31425
by: The Bicycling Guitarist | last post by:
Hi. I found the following when trying to learn if there is such a thing as a non-breaking hyphen. Apparently Unicode has a ‑ but that is not well-supported, especially in older browsers. Somebody somewhere said: Alternately, you can use CSS to declare a class having: ..nowrap { white-space:nowrap } .... and then wrap the compound word in a <span class=nowrap></span> tag (or any other suitable inline tag). You can also try {...
22
8017
by: stevenkobes | last post by:
If a word has a hyphen in it, IE will permit a line break at the hyphen, but Firefox/Mozilla won't. Apparently the Firefox behavior is standards-compliant, but it is not what I want. Is there a way to denote a hyphen in HTML, that the line can be broken after? I've read some stuff about soft hyphens and non-breaking hyphens, but those seem like the opposite of what I'm looking for. I want a normal hyphen, that always appears, and I...
150
6586
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and see if you agree with my opinion or not. Tony Marston http://www.tonymarston.net
2
1330
by: gitimaya | last post by:
hi, can anyone please help me in breaking up a string in array of strings. The delimeter is a character declared as '\001'. lets say i have a string as char d='\001' xxx'd'yyy'd'aaa i need that in an string array 1st element to be xxx and so on.
13
2262
by: Andrew | last post by:
Hi I was wondering if there is anyway with XML RPC to send a string of text from the server to the client with out calling return thus breaking my loop for example def somefunc(): for action, files in results: full_filename = os.path.join(path_to_watch, files) theact = ACTIONS.get(action, "Unknown")
37
3679
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry over" when there are <br /tags involved...??? I've tried using <p style="font-weight: bold;"></p>, I've tried <blockquote></blockquote>...I just can't figure how I'm supposed to get the <b></btags to work for all the lines! Surely there must be...
5
4129
by: Jeff | last post by:
I have a floated container that is breaking out of it's containing block. I don't remember the tricks to fix that (sorry Dorayme). Jeff
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9484
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8983
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7505
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.