Re: OT: (x)?html question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 &registered; to refer to the character used to represent
&reg;), but it doesn't seem to suggest that you can use it for a whole
string of characters.

> 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.



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux