[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: GOTCHA!
Tyler Baker <tyler@xxxxxxxxxxx> wrote: >The best way to use this I would think for HTML would be to: > >(1) Define a special character that represents   such as some rarely used >character in the Unicode table. >(2) Parse the XML source tree and XSL stylesheet >(3) In the XSL Processor build up the entity table to escape all entities with >the value of that special character (or string of characters) which represent > > >This I feel would be more natural than trying to use CDATA all over the place >for escaping HTML entities. > >Any comments here... I wasn't thinking about emitting character entities - I was thinking about emitting arbitrary embedded JavaScript code, something which is now impossible. XML position of character entities - that as long as the in-memory representation is OK, the textual one doesn't matter - is pretty reasonable, IMVHO. If one wants to override the output representation (say using instead of  (?)), then there should be a special <xsl:char-entity> tag to force the output representation. For the life of me I can't see why this (and <xsl:cdata>) is a tough decision. The output is always valid XML. You can still verify that the output matches a given DTD (including verifying character entities), it is declerative, in the spirit of XSL. I can understand limiting the output to valid XML, but why not allow _all_ of XML? How come <xsl:comment> made it in, and these two haven't? A mystery, indeed. Oren Ben-Kiki. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|