You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ross Gardler <ro...@gardler.org> on 2005/09/09 14:33:47 UTC

match attributes in contracts

Contracts have a match attribute, for example:

<xsl:template name="content-title-body" 
match="div[@id='content']/h1[position()=1]">

What is the purpose of this attribute?

My reason for asking is this particular match was not changed in the 
XHTML2 version of the contract, but it still works.

Ross

Re: match attributes in contracts

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> On 9/9/05, Ross Gardler <ro...@gardler.org> wrote:
> 
>>Contracts have a match attribute, for example:
>>
>><xsl:template name="content-title-body"
>>match="div[@id='content']/h1[position()=1]">
>>
>>What is the purpose of this attribute?
> 
> 
> They do what you might expect, they are included in eventually called
> based on the view (i.e. default.fv).   There's one step that does the
> "including" of contracts and another that does the aliased "calling"
> of contracts.
>  
> 
>>My reason for asking is this particular match was not changed in the
>>XHTML2 version of the contract, but it still works.
> 
> 
> It still works because I changed the xhtml2_to_html stylesheet output
> html somewhat consistent with the old document2html output (i.e. there
> is now a div id=content).
> 

No, that is not the case, I have reverted that change locally.

Ross

Re: match attributes in contracts

Posted by Tim Williams <wi...@gmail.com>.
On 9/9/05, Ross Gardler <ro...@gardler.org> wrote:
> Contracts have a match attribute, for example:
> 
> <xsl:template name="content-title-body"
> match="div[@id='content']/h1[position()=1]">
> 
> What is the purpose of this attribute?

They do what you might expect, they are included in eventually called
based on the view (i.e. default.fv).   There's one step that does the
"including" of contracts and another that does the aliased "calling"
of contracts.
 
> My reason for asking is this particular match was not changed in the
> XHTML2 version of the contract, but it still works.

It still works because I changed the xhtml2_to_html stylesheet output
html somewhat consistent with the old document2html output (i.e. there
is now a div id=content).

--tim