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

Re: Why processor or stylesheets puts strange output

Subject: Re: Why processor or stylesheets puts strange output
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 26 Aug 2002 12:02:11 -0600 (MDT)
typing numeric
abradoom wrote:
> I am aware of very few character entities like &lt; &gt; etc.
> where can i get  details of those

How about the XML 1.0 specification? But the list is very short:

  &lt;   <
  &gt;   >
  &amp;  &
  &quot; "
  &apos; '

These are the only built-in character entities. You never actually need
&gt;, and you rarely need &quot; or &apos; except in attribute values
that use the same kind of quotes as delimiters around the value. Examples:

  <foo bar="&quot;hello world&quot; isn't what I said"/>
  <foo bar='"hello world" isn&apos;t what I said'/>

You can load up your XML document's DTD with more entities if you like. A
standard set of SGML entities (the ones used by HTML) can be obtained at
http://www.oasis-open.org/cover/xml-ISOents.txt

So for example, in your stylesheet, if you really want to use &nbsp;, and
typing numeric character references like &#xA0; or &#160; or the literal
character (alt-0160 on WinNT,2K,XP) is too difficult for some reason, then
you can put

  <!DOCTYPE xsl:stylesheet SYSTEM "xml-ISOents.txt">

in the document. (and don't forget to put standalone="no" in your XML
declaration).

If typing numeric character references like &#1234; is easier (I would say it
certainly is, and is guaranteed to work), then you can get a list of what
numbers correspond to what characters by looking at the Unicode charts at
http://www.unicode.org/charts/

Also try http://www.macchiato.com/unicode/charts.html ..but not that it will
only show you printable characters that your browser is capable of displaying.
On the plus side it shows you UTF-8 and UTF-16 code value sequences.

In Unicode there are currently 95221 non-private characters assigned numbers
between 0 and 917631 (the range goes up to 1114111, hex 10FFFF), so don't
expect it all to fit on a chart that you can put in your pocket. It's worth
buying the Unicode Standard (hardcover book) if you need such a reference.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.