You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Kevin Sonney <ke...@webslingerz.com> on 2000/09/12 17:33:49 UTC

Update to docs/XSP bug (was Re: Mailing List Archive)

On Tue, 12 Sep 2000, Stefano Mazzocchi wrote:
> This is great news. I'll update the Cocoon docs right away.

While you're inside the docs, there's a little error I found in them this
morning.

The docs for xsp:pi refer to the tag structure as follows :

<xsp:pi name="xml-stylesheet">

According to the XSP logicsheet itself, the proper syntax is 

<xsp:pi target="xml-stylesheet">

So in it's current state (1.8-dev), either the XSP doc or the XSP
logicsheet is incorrect. Which also answers a lot of questions as to why
people have been having such trouble with the xsp:pi tag. 

Although I'm inclined to patch the XSP logic sheet to support both, like
so :

diff -u -r1.18 xsp-java.xsl
--- xsp-java.xsl	2000/08/22 00:39:42	1.18
+++ xsp-java.xsl	2000/09/12 15:38:14
@@ -203,7 +203,14 @@
          because Cocoon expects its PIs to be at the top level. -->
     document.appendChild(
        document.createProcessingInstruction(
+	<xsl:choose>
+	<xsl:when test="@target">
          "<xsl:value-of select="@target"/>",
+	</xsl:when>
+	<xsl:otherwise>
+	"<xsl:value-of select="@name"/>",
+	</xsl:otherwise>
+	</xsl:choose>
          <xsl:for-each select="xsp:text|xsp:expr">
            <xsl:choose>
              <xsl:when test="name(.) = 'xsp:text'">

Thoughts, anyone?

-- 
+-------------------------------------------+
| Kevin Sonney        kevin@webslingerZ.com |
| Systems Programmer    www.webslingerZ.com |
+-------------------------------------------+


Re: Update to docs/XSP bug (was Re: Mailing List Archive)

Posted by Stefano Mazzocchi <st...@apache.org>.
Kevin Sonney wrote:
> 
> On Tue, 12 Sep 2000, Stefano Mazzocchi wrote:
> > This is great news. I'll update the Cocoon docs right away.
> 
> While you're inside the docs, there's a little error I found in them this
> morning.
> 
> The docs for xsp:pi refer to the tag structure as follows :
> 
> <xsp:pi name="xml-stylesheet">
> 
> According to the XSP logicsheet itself, the proper syntax is
> 
> <xsp:pi target="xml-stylesheet">
> 
> So in it's current state (1.8-dev), either the XSP doc or the XSP
> logicsheet is incorrect. Which also answers a lot of questions as to why
> people have been having such trouble with the xsp:pi tag.
> 
> Although I'm inclined to patch the XSP logic sheet to support both, like
> so :
> 
> diff -u -r1.18 xsp-java.xsl
> --- xsp-java.xsl        2000/08/22 00:39:42     1.18
> +++ xsp-java.xsl        2000/09/12 15:38:14
> @@ -203,7 +203,14 @@
>           because Cocoon expects its PIs to be at the top level. -->
>      document.appendChild(
>         document.createProcessingInstruction(
> +       <xsl:choose>
> +       <xsl:when test="@target">
>           "<xsl:value-of select="@target"/>",
> +       </xsl:when>
> +       <xsl:otherwise>
> +       "<xsl:value-of select="@name"/>",
> +       </xsl:otherwise>
> +       </xsl:choose>
>           <xsl:for-each select="xsp:text|xsp:expr">
>             <xsl:choose>
>               <xsl:when test="name(.) = 'xsp:text'">

Good catch, but we should be enforcing strict constracts if possible. I
say we go with what the docs says.

Comments?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------