[daisy] Documentation about references

Marc Portier mpo at outerthought.org
Mon Jun 16 08:57:55 CEST 2008


Antal,

it looks like you are struggling with basic xpath and xslt notation.

you might want to read up on those specs in a good book, or dwell around 
the many online tutorials and guides about them. (e.g. at http://zvon.org)


Antal Koós wrote:
> Thanks, it helped me.
> 
> Where can I get more info about the term "apply-templates"? (in Cocoon?)
> ( e.g.:  <xsl:apply-templates
> select="d:fields/d:field[@name='field1']/@valueFormatted"/> )
> 
> And why  it is not  working with "valueFormatted":
> <p>Created: <xsl:apply-templates select="@created/@valueFormatted"/></p>
> 

xpath declares a syntax for expressions that select (or match) a set of 
'nodes' from an XML node-tree. The used node-tree model looks a lot like 
the DOM model for XML (which you might be familiar with)

In any case the expression you used above would point to an 
attribute-node that is the child of another attribute-node (while XML 
doesn't allow attributes to have any children or nested structure of any 
sort, only a value)


so the expression:

d:fields/d:field[@name='field1']/@valueFormatted

points to all attribute-nodes called valueFormatted that are present on
   - elements d:field that are
      - having an attribute name which value equals 'field1'
      - and that are being nested in a parent element d:fields

Your question makes me think you would have liked the @created 
attribute-value to be formatted in some other way then it is?

regards,
-marc=

> Regards,
>   Antal Koós
> 
> 
> On Fri, Jun 13, 2008 at 23:01, Sieranski, Greg
> <greg.sieranski at quoininc.com> wrote:
>> Antal Koós wrote:
>>> Hi,
>>>
>>> Where can I find information about these references:
>>> "d:fields/d:field[@name='field1']/@valueFormatted"
>>> ?
>>>
>>> Regards,
>>>  Antal Koós
>>
>> I think this might be what you want.
>>
>> http://cocoondev.org/daisydocs-2_2/374-cd/g1/26-cd.html
>>
>> -- Greg Sieranski
>> _______________________________________________
>> daisy community mailing list
>> Professional Daisy support:
>> http://outerthought.org/en/services/daisy/support.html
>> mail to: daisy at lists.cocoondev.org
>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> daisy community mailing list
>> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
>> mail to: daisy at lists.cocoondev.org
>> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list