cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/javascript xsp.xsl
Date Fri, 02 Aug 2002 02:18:06 GMT
vgritsenko    2002/08/01 19:18:06

  Modified:    .        Tag: cocoon_2_0_3_branch changes.xml
               src/java/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: cocoon_2_0_3_branch xsp.xsl
               src/java/org/apache/cocoon/components/language/markup/xsp/javascript
                        Tag: cocoon_2_0_3_branch xsp.xsl
  Log:
      XSP now verifies that value of attribute name on xsp:element does not
      contains ':'. To create namespaced elements, uri and prefix attributes
      must be used.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.138.2.40 +6 -1      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.138.2.39
  retrieving revision 1.138.2.40
  diff -u -r1.138.2.39 -r1.138.2.40
  --- changes.xml	2 Aug 2002 02:03:38 -0000	1.138.2.39
  +++ changes.xml	2 Aug 2002 02:18:05 -0000	1.138.2.40
  @@ -39,6 +39,11 @@
    </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="VG" type="update">
  +    XSP now verifies that value of attribute name on xsp:element does not
  +    contains ':'. To create namespaced elements, uri and prefix attributes
  +    must be used.
  +  </action>
     <action dev="VG" type="fix">
       Request, response, and session logicsheet were incorrectly returning
       result when as="xml" is specified.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.2   +11 -9     xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl
  
  Index: xsp.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.2
  diff -u -r1.9.2.1 -r1.9.2.2
  --- xsp.xsl	19 Jun 2002 14:11:04 -0000	1.9.2.1
  +++ xsp.xsl	2 Aug 2002 02:18:06 -0000	1.9.2.2
  @@ -220,6 +220,14 @@
         </xsl:call-template>
       </xsl:variable>
   
  +    <xsl:if test="@name and contains(@name, ':')">
  +      <xsl:call-template name="error">
  +        <xsl:with-param name="message">[&lt;xsp:element name="<xsl:value-of
select="@name"/>"&gt;]
  +Name can not contain ':'. If you want to create namespaced element, specify 'uri' and 'prefix'.
  +        </xsl:with-param>
  +      </xsl:call-template>
  +    </xsl:if>
  +
       <xsl:variable name="name">
         <xsl:call-template name="get-parameter">
           <xsl:with-param name="name">name</xsl:with-param>
  @@ -262,8 +270,6 @@
             "<xsl:value-of select="local-name(.)"/>",
             "<xsl:value-of select="."/>");
         </xsl:if>
  -      <xsl:for-each select="$parent-element/namespace::*[local-name(.) = $ns-prefix
and string(.) = $ns-uri]">
  -      </xsl:for-each>
       </xsl:for-each>
   
       <!-- Declare namespace defined by @uri and @prefix attribute -->
  @@ -273,8 +279,6 @@
             <xsl:value-of select="$prefix"/>,
             <xsl:value-of select="$uri"/>);
         </xsl:if>
  -      <xsl:for-each select="$parent-element/namespace::*[local-name(.) = $prefix and
string(.) = $uri]">
  -      </xsl:for-each>
       </xsl:if>
   
       <xsl:apply-templates select="xsp:attribute | xsp:logic[xsp:attribute]"/>
  @@ -303,8 +307,6 @@
         <xsl:if test="not($parent-element/namespace::*[local-name(.) = $prefix and string(.)
= $uri])">
           this.contentHandler.endPrefixMapping(<xsl:value-of select="$prefix"/>);
         </xsl:if>
  -      <xsl:for-each select="$parent-element/namespace::*[local-name(.) = $prefix and
string(.) = $uri]">
  -      </xsl:for-each>
       </xsl:if>
   
       <xsl:for-each select="namespace::*">
  @@ -529,7 +531,7 @@
   
       <xsl:choose>
         <xsl:when test="@*[name(.) = $name]">"<xsl:value-of select="@*[name(.) =
$name]"/>"</xsl:when>
  -      <xsl:when test="(*[namespace-uri(.)=$xsp-uri and local-name(.) = 'param'])[@name
= $name]">
  +      <xsl:when test="xsp:param[@name = $name]">
           <xsl:call-template name="get-parameter-content">
             <xsl:with-param name="content"
                             select="(*[namespace-uri(.)=$xsp-uri and local-name(.) = 'param'])[@name
= $name]"/>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.2   +11 -7     xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/javascript/xsp.xsl
  
  Index: xsp.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/javascript/xsp.xsl,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- xsp.xsl	19 Jun 2002 14:11:04 -0000	1.6.2.1
  +++ xsp.xsl	2 Aug 2002 02:18:06 -0000	1.6.2.2
  @@ -132,6 +132,14 @@
         </xsl:call-template>
       </xsl:variable>
   
  +    <xsl:if test="@name and contains(@name, ':')">
  +      <xsl:call-template name="error">
  +        <xsl:with-param name="message">[&lt;xsp:element name="<xsl:value-of
select="@name"/>"&gt;]
  +Name can not contain ':'. If you want to create namespaced element, specify 'uri' and 'prefix'.
  +        </xsl:with-param>
  +      </xsl:call-template>
  +    </xsl:if>
  +
       <xsl:variable name="name">
         <xsl:call-template name="get-parameter">
           <xsl:with-param name="name">name</xsl:with-param>
  @@ -179,8 +187,6 @@
         <xsl:if test="not($parent-element/namespace::*[local-name(.) = $prefix and string(.)
= $uri])">
           contentHandler.startPrefixMapping(<xsl:value-of select="$prefix"/>, <xsl:value-of
select="$uri"/>);
         </xsl:if>
  -      <xsl:for-each select="$parent-element/namespace::*[local-name(.) = $prefix and
string(.) = $uri]">
  -      </xsl:for-each>
       </xsl:if>
   
       <xsl:apply-templates select="xsp:attribute | xsp:logic[xsp:attribute]"/>
  @@ -202,8 +208,6 @@
         <xsl:if test="not($parent-element/namespace::*[local-name(.) = $prefix and string(.)
= $uri])">
           contentHandler.endPrefixMapping(<xsl:value-of select="$prefix"/>);
         </xsl:if>
  -      <xsl:for-each select="$parent-element/namespace::*[local-name(.) = $prefix and
string(.) = $uri]">
  -      </xsl:for-each>
       </xsl:if>
   
       <xsl:for-each select="namespace::*">
  @@ -422,7 +426,7 @@
   
       <xsl:choose>
         <xsl:when test="@*[name(.) = $name]">"<xsl:value-of select="@*[name(.) =
$name]"/>"</xsl:when>
  -      <xsl:when test="(*[namespace-uri(.)=$xsp-uri and local-name(.) = 'param'])[@name
= $name]">
  +      <xsl:when test="xsp:param[@name = $name]">
           <xsl:call-template name="get-parameter-content">
             <xsl:with-param name="content"
                             select="(*[namespace-uri(.)=$xsp-uri and local-name(.) = 'param'])[@name
= $name]"/>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message