This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: illegal characters in large XML files
- From: Wendell Piez <wapiez at mulberrytech dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 03 Jul 2002 14:15:25 -0400
- Subject: Re: [xsl] illegal characters in large XML files
- Reply-to: xsl-list at lists dot mulberrytech dot com
Meltem,
Set a variable to contain characters that are safe:
<xsl:variable name="safestring" select="'

ABCDEFGHIJKLMNOPQRSTUVWXYZ@*$%'/>
Then an expression of the form
translate(., $safestring, '')
will return a string value consisting of the current node stripped of all
the characters appearing in the safe string.
I hope that helps,
Wendell
At 01:08 PM 7/3/2002, you wrote:
We are populating a database from a large xml file and at some point the
database breaks into an infinite loop in the Stored Procedure due to the
existence of one or more illegal characters.
We are trying to find out if it is possible to create a report using XSL to
identify the so called offending nodes, requesting something like a list of
nodes that contain anything that is not an alphanumeric character, and then
throw some exceptions like . . . Ignore '@', '£', '*' etc . .
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list