RE: [xsl] Register Marks, Funny Character Problems

Subject: RE: [xsl] Register Marks, Funny Character Problems
From: cknell@xxxxxxxxxx
Date: Wed, 15 Jan 2003 12:10:54 -0500
Scott Purcell wrote:
> The developer created some class files and basically is creating
> the xml by printing the data to a text file.

> First question: I know this is probably not the right way, but what > should one do when the files get huge like this?

You will probably want to go back to your developer and ask him or her to write Java classes using the SAX classes (org.xml.sax.*, org.xml.sax.helpers.*) to parse the data. I have been following this list for some time and that seems to be the answer that comes up repeatedly. XSLT doesn't appear to have a means of handling large files in modest amounts of RAM. There was a thread in the last week or so discussing the possiblity of managing an XSLT transform piece-meal by writing a new kind of transformer which could operate on only a partial document tree. It didn't look promising.

On the question of creating text files, you could easily store these data files in Oracle tables as CLOBs. This would give you the advantages of  being able to do database lookups to retrieve them.

> Second question: The way we are doing this, there are trademark,
> and register symbols in the database that are screwing up the xml
> when we try and parse it later.
> Does anyone have any insight into this problem arena?

You can encode these before storing them in the database. For example, you can replace the registered trademark symbol with ® (ampersand pound 174 semi-colon) and the copyright symbol with © (ampersand pound 169 semi-colon). Just check an ASCII table for the decimal code the symbols you want.

-- 
Charles Knell
cknell@xxxxxxxxxx - email

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread