forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Enhancement - About <metalink>....
Date Fri, 11 Jul 2003 13:36:17 GMT
On Fri, Jul 11, 2003 at 04:52:32AM -0600, Antonio Gallardo wrote:
> Hi:
> 
> Currently I am adding some link to a site. After adding all the links to
> the site.xml, I found there is a very recurrent task to write something
> like:
> 
> <link href="site:register_process" title="Process of Register
> Providers">Register Providers</link>
> 
> I think we can create a repository called metalinks.xml (similar to
> site.xml) where we can define frecuent used links, and just call it from
> there. I think like a expand-macro-style.
> 
> <metalinks>
>   <metalink id="register_process">
>     <link href="site:register_process"
>       title="Process of Register Providers">
>         Register Providers
>     </link>
>   </metalink>
> </metalinks>
> 
> The inside any doc, we can write:
> 
> <p>The <metalink id="register_process"/> is done.....</p>
> 
> Forrest has already this type of functionality? If not can we build
> something like that? This is just an idea to enhance forrest. Maybe the
> correct name cannot be <metalink> but the idea looks nice to me.

Yes, its a nice idea.  I'd really like to get a macro system going in
Forrest.  We can implement macros very easily with XSLT:

<xsl:template match="metalink">
  <xsl:variable name="sitenode" select="document('site.xml')//*[local-name()=@id]"/>
  <link href="{$sitenode/@href}"><xsl:value-of select="$sitenode/@label"></link>
</xsl:template>

<xsl:template match="cocoon:version">
  <xsl:text>2.3-m3</xsl:text>
</xsl:template>

<xsl:template match="forrest:bugtracker">
  <link href="http://issues.cocoondev.org">Forrest's Bugtracker</link>
</xsl:template>

etc.

Only technical problem holding us back is our reliance on DTDs.  We need
a schema language that allows open content models, and a way of
validating XML with tags from lots of different macro schemas.  James
Clark has neatly solved both problems:

http://www.thaiopensource.com/relaxng/nrl.html


--Jeff


> Please comment about this.
> 
> Best Regards,
> 
> Antonio Gallardo.
> 
> 
> 

Mime
View raw message