OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Getting "<" and "&" sign in the HTML document

[ Lists Home | Date Index | Thread Index ]
  • From: "DuCharme, Robert" <DuCharmR@moodys.com>
  • To: "'prasadm@crt.com'" <prasadm@crt.com>, xml-dev@ic.ac.uk
  • Date: Thu, 27 Jan 2000 11:04:25 -0500

>I have written an XSL which converts an XML document to HTML. 
>The problem I am facing is, I am trying to send "&nbsp;"(HTML blank space)
>and "<"  to my HTML doc, but the parser intreprets this and sends 
>the blank space as "&#38;nbsp;" and the "<" sign as "&#60;"

Use &lt; for < and &nbsp; for the HTML blank. You don't need to declare <,
because it's one of the five character entities that all XML processors are
already supposed to understand, but you do need to declare nbsp, so begin
your XSL stylesheet like this:

<?xml version="1.0"?>
<!DOCTYPE stylesheet [
<!ENTITY nbsp "&#x00A0;">
]>

Bob DuCharme       www.snee.com/bob       <bob@  
snee.com>  see www.snee.com/bob/xmlann for "XML:
The Annotated Specification" from Prentice Hall.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom@ic.ac.uk the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email@your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS