Hi,
Eventually found qMax's 27th Jan 2005 post on this in the archives -
Subject: "namespaces in form editor".
Cheers,
James
On Sat, 5 Aug 2006 [EMAIL PROTECTED] wrote:
Date: Sat, 5 Aug 2006 18:07:56 +0000 (UTC)
From: [EMAIL PROTECTED]
Reply-To: user@lenya.apache.org
To: user@lenya.apache.org
Subject: Formeditor xupdate problems
Hi,
(see below for .rng and .xsl files)
I've created a simple custom document type.
I can create documents, edit them with the source editor
and edit the metadata just fine.
With the formeditor, it will open the document and
display the editing sections and buttons. You can edit a field but it
doesn't update (i.e., it reverts back to the orignal text). The file does
get get saved however (timestamp changes).
I'm guessing this is a path / namespace issue with XSLT and / or xupdate.
Has anyone any ideas?
Cheers,
James
===============
.xsl file
===============
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:image="http://www.ngrm.org.uk/xmlns/image/1.0"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:import href="../../../../../xslt/authoring/edit/form.xsl"/>
<xsl:template match="image:image">
<node name="Title" select="alt">
<content>
<textarea name="<xupdate:update
select="alt">" cols="40" rows="1">
<xsl:value-of select="image:alt" />
</textarea>
</content>
</node>
<node name="Caption" select="desc">
<content>
<textarea name="<xupdate:update
select="desc">" cols="40" rows="1">
<xsl:value-of select="image:desc"/>
</textarea>
</content>
</node>
<node name="Attribution" select="attribution">
<content>
<textarea name="<xupdate:update
select="attribution">" cols="40" rows="1">
<xsl:value-of select="image:attribution"/>
</textarea>
</content>
</node>
</xsl:template>
</xsl:stylesheet>
==================
.rng file
==================
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="http://www.ngrm.org.uk/xmlns/image/1.0"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
>
<define name="Number.datatype">
<text/>
</define>
<define name="Text.datatype">
<text/>
</define>
<include href="lenya.rng"/>
<start>
<element name="image">
<ref name="lenya.meta"/>
<element name="alt"><text /></element>
<element name="desc"><text /></element>
<element name="attribution"><text
/></element>
</element>
</start>
</grammar>
--
[EMAIL PROTECTED]
SDF-EU Public Access UNIX System - http://sdf-eu.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
[EMAIL PROTECTED]
SDF-EU Public Access UNIX System - http://sdf-eu.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]