Re: xtd example for attributes

Le jeudi 10 septembre 2009 à 20:12 +0200, Philipp Mamat a écrit :
> Hi,
> 
> I'm new to this mailing list and hope I don't post a stupid question.
> I did neither find a solution in the FAQ nor in the mailing list's
> archive. If this question was answered before: Please give me a hint
> where to find the solution. Thanks in advance!
> 
> I got this xtd file (which I suppose to be wrong):
> --- start ---
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xt="http://ns.inria.org/xtiger">
> <head>
>   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
>   <title><xt:use types="string" label="title">Neu</xt:use></title>
>   <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/" />
> 
>   <xt:head version="0.9" templateVersion="1.0">
>   </xt:head>
> </head>
> 
> <body>
> <p><a><xt:attribute name="href" type="string" use="required" default="#"/>
> Link </a> </p>
> </body>
> </html>
> --- end ---
> 
> The magic should be done in the last part: I want to be able to edit
> the href attribute of an anchor / link inside the template.
> When creating a new file with this template (using the current
> snapshot "11.3 - Sep 9 2009") I find no way to change the attributes
> value.

As explained in the "Help>Amaya Help" documentation (section 9 Editing
with templates), the <xt:attribute> only impacts the "Attributes" panel.
In your example, You have to select the <a> element and edit the value
in the "Attributes" panel.
I just realize that the "Link" button of the "Element" panel should work
in that case.
I'll try to add that possibility.

> 
> Please give me a hint how to change the xtd template file and / or how
> to set the attribute's value.
> Thank you for your time, kind regards,
>  Philipp
> 
> 
-- 
Irene Vatton <Irene.Vatton@inria.fr>
INRIA

Received on Wednesday, 16 September 2009 07:40:51 UTC