This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: illegal characters in large XML files


Meltem,

Set a variable to contain characters that are safe:

<xsl:variable name="safestring" select="'&#xA; 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]