[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
More entity confusion and my opinion on the right way
Subject: More entity confusion and my opinion on the right way From: Andrew Bunner <bunner@xxxxxxxxxxxxxxxxxx> Date: Tue, 05 Jan 1999 14:36:37 -0800 |
Here's what I don't understand about the entity-writing problem... If I include & in my source document or stylesheet, I get & in my result document (this is good since my result document is HMTL). If I include " in my source document or stylesheet, I get " in the result document. Hmm. OK. Of even greater confusion to me is if I include © in my source document. In this case, I get an error... © references an undefined entity. BUT, if I include © in my source document, I get © in the result document. 'Hooray!' I think to myself, this must mean that if I include an entity reference to an ascii code, it will get translated to the right HTML entity. Wrong.   (space) gets translated to the space character, not to So, upon reflection, my post-processing solution isn't very good. What if I want " to appear in the result document? That entity is already defined in XML. Should I insert special "entity tags" like <myhack:nbsp/> and then write out "unusual" strings (ala ##nbsp##) for which I can grep and then replace with ampersand-ed references? Does anyone have any thoughts? My thinking is that the "right" way to do this is to somehow let the XSL processor know which entities are allowed to appear in the result document. Could we expand on the resultns attribute? Maybe it should reference a DTD for the result document... then the XSL processor can read the result document's DTD and decide which entities it should write out and which ones it should complain about. -- Andrew Andrew Bunner President, Mass Quantities, Inc. bunner@xxxxxxxxxxxxxxxxxx Professional Supplements for the Perfect Physique http://www.massquantities.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: writing entity references., David Carlisle | Thread | Re: More entity confusion and my op, James Clark |
Re: writing entity references., Andrew Bunner | Date | Re: XT extension mechanism, Flow Simulation |
Month |
Keywords