Subject: Re: Jade for HTML From: "W. Eliot Kimber" <eliot@xxxxxxxxxx> Date: Tue, 22 Apr 1997 07:36:37 -0900 |
At 05:39 AM 4/22/97 -0700, G. Ken Holman wrote: >I'm planning to hardcode <A> elements that are external to the website and >custom code <intA> elements that are internal to the website ... with the >engine producing the required <A> element for the output of the "internal" >reference. By "hardcode" do you mean putting URLs directly on the A elements or do you mean refering to data entities whose system identifiers are URLs? I haven't tried it yet, but it should be easy enough to implement simple HyTime indirection with Jade, using either the original nameloc/nmlist design or the new and improved name-space location address (nmsploc), shown below. For example, to have a single hyperlinking element that always uses IDREF and can directly refer to elements in the same document and indirectly refer to objects without IDs (including elements in other documents), you would do something like this: <!DOCTYPE MyDoc PUBLIC "-//ME//DTD Mine//EN" [ <!ELEMENT nmsploc -- Name-space location address, optimized for addressing elements in other documents. -- - - (#PCDATA) -- Content is list of names -- > <!ATTLIST nmsploc ID ID #REQUIRED locsrc -- Location source: node in grove that exhibits name space. If a document or subdocument entity, addresses root of document grove (SGMLDOC). If not specified, addresses document in which nmsploc occurs. -- ENTITY #IMPLIED namespc -- Name space being addressed. Can be any named node list property in grove. Location source directly or indirectly addresses node that exhibits the property. -- (elements|entities) elements naimpsrc -- Implied location source (when locsrc not specified or names document or data entity). -- (grovert|ptreert) "grovert" -- Grove root -- HyTime NAME #FIXED "nmsploc" > <!ENTITY % user-locaddrs "nmsploc" > <?FSIDR URL > <!-- Declare use of URL formal system identifier notation --> <!NOTATION URL SYSTEM -- HTTP URLs --> <!NOTATION HTML SYSTEM -- HTML documents: no reason to pretend they're SGML any more. --> <!ENTITY drmacro.home SYSTEM "<url>http://www.drmacro.com" NDATA HTML > > <mydoc> <location-addresses> <nmsploc id=drmhome locsrc=drmacro.home>HYPERLINKS</nmsploc> </location-addresses> ... <p>For more about HyTime see <a refid=drmhome>Dr. Macro's Home Page</>... ... </mydoc> One problem with having linking elements that are distinguished by the form of address (internal vs. external), is that when you discover that managing your data as a single instance becomes unworkable (which you will), you will have the problem that what were internal references become external references among the members of the compound document that represents your Web site. In my opinion, it's better to plan for that from the start and build the necessary infrastructure to begin with. If you wanted to be more direct with the URL stuff, you could create a "URLloc" element type that is derived from the new "queryloc" form: <!ELEMENT URLloc - - (#PCDATA) -- Content is a URL -- > <!ATTLIST URLloc ID ID #REQUIRED notation (URL) URL HyTime NAME #FIXED "queryloc" > Used like so: <location-addresses> <nmsploc id=drmhome locsrc=drmacro.home>HYPERLINKS</nmsploc> <!-- Equivalent URLloc: --> <urlloc id=drm-richiii>http://www.drmacro.com/rich-iii</urlloc> </location-addresses> This would save having to declare the entity for the HTML document. If you insist on putting the URL directly on an element, HyTime provides a mechanism for declaring that the URL is a reference that a HyTime-aware processor should process: <!ELEMENT Aext -- hyperlink that only links to HTML pages -- - - (#PCDATA) > <!ATTLIST Aext href CDATA #REQUIRED -- URL -- loctype CDATA #FIXED "href QUERYLOC #NOTATION URL" HyTime NAME #FIXED "clink" HyNames CDATA #FIXED "linkend href" > Used like so: <aext href="http://www.drmacro.com/bookrev">Click here to review my book on HyTime</aext> Cheers, E.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Jade for HTML, Paul Prescod | Thread | Re: Jade for HTML, James Clark |
Re: Jade for HTML, Taranov Alexander | Date | Jade and hyperdocuments, W. Eliot Kimber |
Month |