OT: (x)?html question

Don Russell fedora at drussell.dnsalias.com
Wed Dec 20 15:03:44 UTC 2006


Tim wrote:
> On Tue, 2006-12-19 at 14:07 -0800, Don Russell wrote:
>   
>> I thought there was a way in html to define an "entity" and then use 
>> that throughout the document.
>>
>> So, for example I might have something that appears in multiple places 
>> but I only want to code it once:
>>
>> I was thinking of something like...
>> <meta entity="callno" content="1(123)555-1212"/>
>>     
>
> Quickly looking at <http://www.w3.org/TR/xhtml1/>, it looks like you can
> create new entities for referencing particular characters (e.g. you can
> make your own ®istered; to refer to the character used to represent
> ®), but it doesn't seem to suggest that you can use it for a whole
> string of characters.
>   

I may have poisoned my thinking and got stuck with "entity"... maybe 
there's something else. Or maybe it's a figment of my imagination.. 
something I wish were available. I know it's possible with other mark up 
languages like IBMs DCF...

>   
>> Then I could use &callno; in the body of the document and the browser 
>> would properly substitute the specified value.
>>
>> I suppose I could write a little javascript function and then use 
>> <script>...</script> to call it as needed and the function would use 
>> document.write.... but that really is overkill, and I'd prefer not to 
>> REQUIRE javascript.
>>
>> Any suggestions?
>>     
>
> Non-XHTML alternative solutions:  
>
> Search and replace in your text editor, if it's for a once off authoring
> solution.
>
> SSI for webpages that might need their variables updated.  I do that for
> my price lists.  One "include" source gets updated, and any page that
> refers to some particular item's price shows the current one.
>
>   

SSI may be viable solution ....

Thanks,
Don




More information about the fedora-list mailing list