[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: output to iso-8859-1 of non-iso characters, what i

Subject: Re: output to iso-8859-1 of non-iso characters, what is required action
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 7 May 2008 16:30:39 +0100
Re:  output to iso-8859-1 of non-iso characters
> (personally I think it should do the
> same in comment nodes - not sure why it was decided not to),

It is not possible in XML to represent a character that is not in the
specified encoding if that character is in a comment.

foo contains a single character
the comment contains the 7 characters & # 1 2 3 4 ; and there is no way
to express a commented U+1234 character unless the document's encoding
includes that character.

> given that translate (in XSL 1) of all non iso-8859-1 characters to an
> empty string is easy do you think you could send me one? :)
its easier of course in xsl2 but

xsl:template match="text()">
<xsl:value-of select="translate(.,translate(.,'ABC',''),'')"/>

will get rid of all characters other than ABC, just make a string of all
230 or so legal latin1 charas and you are done.


The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.