ZVON > Graphotron > Graphotron Reference
| >> graphotron << | daVinci | vcg | dot | tutorial | download | about |

Namespace http://zvon.org/graphotron
Element any:edge-property
Description If the element does not come from a supported namespace, it is ignored. If it comes from a supported namespace, its local-name is used as a parameter name of the given application. Value of the application parameter can be specified either by its content or it can be extracted from the source document using select, select-from-target, and value-of attributes. If some of the above attributes is used, then text data are used as a default value if the used attributes do not return any match.
Attributes select [ optional ]
An XPath setting the value of a vertex property. It can use keys, variables, and params. If a relative XPath is specified it is taken relative to the nodes selected by the match attribute of the parent edge element. Inside value-of attribute its value can be recovered using $select variable. This attribute sets property value, if value-of attribute is not given.

select-from-target [ optional ]
An XPath setting the value of a vertex property. It can use keys, variables, and params. If a relative XPath is specified it is taken relative to the nodes selected by the select attribute of the parent edge element. Inside value-of attribute its value can be recovered using $select-from-target variable. This attribute sets property value, if neither select nor value-of attributes are given.

value-of [ optional ]
An XPath expression, in which results returned by attributes select ($select) and select-from-target ($select-from-target) can be used.
Parents edge
Related: Dot reference
daVinci reference
VCG reference

XML Source

<source>
     <AAA>
          <red/>
          <green/>
          <yellow/>
     </AAA>
     <dotted>
          <BBB/>
     </dotted>
     <dashed>
          <CCC/>
     </dashed>
</source>
Graphotron Source

<graphotron version="1.0" xmlns="http://zvon.org/graphotron" xmlns:vcg="http://zvon.org/graphotron/vcg" >
     <global-settings>
          <vcg:display_edge_labels>yes</vcg:display_edge_labels>
     </global-settings>
     <vertex match="//*">
          <name select="name()"/>
     </vertex>
     <edge match="/*" select="*">
          <vcg:label select="name()" select-from-target="name()" value-of="concat($select,' -> ',$select-from-target)"/>
     </edge>
     <edge match="//AAA" select="*">
          <vcg:color select-from-target="name()"/>
          <vcg:thickness>3</vcg:thickness>
     </edge>
     <edge match="/*/*[starts-with(name(),'d')]" select="*">
          <vcg:linestyle select="name()"/>
     </edge>
</graphotron>

Display
Graph screenshot