You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by de...@lenya.apache.org on 2008/04/18 02:03:14 UTC

Document changed: Editing (BXE)

Document: Editing (BXE)
URL: https://lenya.zones.apache.org/cms/docu/authoring/docu20/tutorials/newResourceType/newResourceTypePart5.html
Changed by user: Andreas Hartmann (andreas)


----
Removed: /comment()[1]

  Copyright 1999-2006 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

----
Removed: /comment()[2]
 $Id: metadata.xml 55543 2004-10-26 00:14:59Z gregor $ 
----
Removed: /document/body/section[2]/source[1]/text()
<component-instance name="person"
  ...
  <format name="webdavGET" uri="cocoon://modules/person/davget.xml"/>
</component-instance>
----
Added: /document/body/section[2]/source[1]/text()
<component-instance name="person"  ...  <format name="webdavGET" uri="cocoon://modules/person/davget.xml"/></component-instance>
----
Removed: /document/body/section[2]/source[2]/text()
<!-- webdav GET matcher -->
<map:match pattern="davget.xml">
  <map:act type="set-header">
    <map:parameter name="Last-Modified" value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />
    <map:generate src="lenya-document:{page-envelope:document-uuid}"/>
    <map:transform type="uuid2url">
      <map:parameter name="urls" value="absolute"/>
    </map:transform>
    <map:serialize type="xml"/>
  </map:act>
</map:match>
----
Added: /document/body/section[2]/source[2]/text()
<!-- webdav GET matcher --><map:match pattern="davget.xml">  <map:act type="set-header">    <map:parameter name="Last-Modified"      value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />    <map:generate src="lenya-document:{page-envelope:document-uuid}"/>    <map:transform type="uuid2url">      <map:parameter name="urls" value="absolute"/>    </map:transform>    <map:serialize type="xml"/>  </map:act></map:match>
----
Removed: /document/body/section[3]/source[1]/text()
  <xsl:param name="rendertype"/>
  
  ...
      
  <xsl:template name="bxeAttribute">
    <xsl:param name="element"/>
    <xsl:if test="$rendertype = 'edit'">
      <xsl:attribute name="bxe_xpath">
        /rdf:RDF/foaf:Person/foaf:<xsl:value-of select="$element"/>
      </xsl:attribute>
    </xsl:if>
  </xsl:template>
  
  <xsl:template match="foaf:Person">
    <h2>Person Details</h2>
    <table class="person">
      <tr>
        <th>Title:</th>
        <td>
          <xsl:call-template name="bxeAttribute">
            <xsl:with-param name="element">title</xsl:with-param>
          </xsl:call-template>
          <xsl:value-of select="foaf:title"/>
        </td>
      </tr>
      <tr>
        <th>Given name:</th>
        <td>
          <xsl:call-template name="bxeAttribute">
            <xsl:with-param name="element">givenname</xsl:with-param>
          </xsl:call-template>
          <xsl:value-of select="foaf:givenname"/>
        </td>
      </tr>
      <tr>
        <th>Family name:</th>
        <td>
          <xsl:call-template name="bxeAttribute">
            <xsl:with-param name="element">family_name</xsl:with-param>
          </xsl:call-template>
          <xsl:value-of select="foaf:family_name"/>
        </td>
      </tr>
      ...
  </xsl:template>
----
Added: /document/body/section[3]/source[1]/text()
  <xsl:param name="rendertype"/>    ...        <xsl:template name="bxeAttribute">    <xsl:param name="element"/>    <xsl:if test="$rendertype = 'edit'">      <xsl:attribute name="bxe_xpath">        /rdf:RDF/foaf:Person/foaf:<xsl:value-of select="$element"/>      </xsl:attribute>    </xsl:if>  </xsl:template>    <xsl:template match="foaf:Person">    <h2>Person Details</h2>    <table class="person">      <tr>        <th>Title:</th>        <td>          <xsl:call-template name="bxeAttribute">            <xsl:with-param name="element">title</xsl:with-param>          </xsl:call-template>          <xsl:value-of select="foaf:title"/>        </td>      </tr>      <tr>        <th>Given name:</th>        <td>          <xsl:call-template name="bxeAttribute">            <xsl:with-param name="element">givenname</xsl:with-param>          </xsl:call-template>          <xsl:value-of select="foaf:givenname"/>        </td>      </tr>      <tr>        <th>Family name:</th>        <td>          <xsl:call-template name="bxeAttribute">            <xsl:with-param name="element">family_name</xsl:with-param>          </xsl:call-template>          <xsl:value-of select="foaf:family_name"/>        </td>      </tr>      ...  </xsl:template>
----
Removed: /document/body/section[3]/source[2]/text()
<map:transform src="fallback://lenya/modules/person/xslt/foaf2xhtml.xsl">
  <map:parameter name="rendertype" value="{request-param:rendertype}"/>
</map:transform>
----
Added: /document/body/section[3]/source[2]/text()
<map:transform src="fallback://lenya/modules/person/xslt/foaf2xhtml.xsl">  <map:parameter name="rendertype" value="{request-param:rendertype}"/></map:transform>
----

 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org