- From: <lee@sq.com>
- Date: Thu, 13 Mar 97 21:17:59 EST
- To: w3c-sgml-wg@w3.org
- Cc: v@sq.com
h One thing this discussion seems to be missing is that ' and ' are not equivalent. Consider the following example: <!DOCTYPE BOY [ <!Entity % boy-name "Liam"> <!Entity % boy '<!Entity % Liam "<!Entity Liam.name 'I am %boy-name;.'>">' > %boy; %Liam; <!Element Boy - - (#PCDATA)> ]> <Boy>ginger curly hair, bare feet, broad smile - &Liam.name;</Boy> This produces the following nsgmls output: (BOY -ginger curly hair, bare feet, broad smile - I am Liam. )BOY C Notice how the ' is interpreted as delimiting an entity value. Now, how do you change I am %boy-name;. to say I am Andrew's brother without using '? You can't include a " or a ', neither with &# nor directly, because they would end one or other parameter entity literal. This example may appear very obscure. I could give a larger example in which it would no longer be obscure, as can Eliot and Michael and Lou and others: IBMIDDOC, TEI, Davenport all use nested parameter entity deifintions. If you take out the nested definition, you can (with some SGML parsers) get one more level of nesting. Note that you can't do &#39; (like doing \\' in Unix shell scripts) because of the implicit Ee after $#38; -- or at least, I assume that's why it doesn't work. <!entity quot "'"> <!Entity % boy '<!Entity % Liam "<!Entity Liam.name 'I"m %boy-name;.'>">' > does what I want: (BOY -ginger curly hair, bare feet, broad smile - I'm Liam. )BOY C Lee
Received on Thursday, 13 March 1997 21:43:11 UTC