cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Foster <jafos...@engmail.uwaterloo.ca>
Subject Re: [C2] Protected area app
Date Sun, 22 Apr 2001 16:01:12 GMT
<snip>

>>> <map:match pattern="protected**">
>>>     <session validator action>
>>>         <any protected content generated/>
>>>     </session validator action>
>>>     <action failed>
>>>         <back to login/>
>>>     </action failed>
>>> </map:match>
>>> 

<snip>

>> No problem. Replace the <any protected content.../> above with a <mount>

This has probably been mentioned before, but doesn't this look a lot like
Xpath/XSLT? The more example of actions I see, the more it look like a
recursive, set-based mindset is being applied.

Going from a very hazy memory it would look something like...

<xsl:template match="//protected">
  <xsl:apply-template name="validate-action/>
  <xsl:choose>
    <xsl:when test="$validated='TRUE'">
      <xsl:apply-templates/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:apply-template name="back-to-login"/>
    <xsl:otherwise/>
  </xsl:choose>  
</xsl:template>

I'm curious as to how hard it would be to use XSLT/XPath to generate the
appropriate processing chain?  The model would be something like:

  URL --> XSLT --> SiteMap XML Fragment --> SiteMap XSL --> execution

While this does shoehorn XSL/XPath into yet another purpose, it does allow
for the reuse of skills and XSL tools.  If the XML fragment can be captured
it also allows for (hopefully) easier debugging of how various URLs are
being interpreted.

More thoughts from a very confused, and very apologetic for his previous
post, pseudo-lurker.

Jason Foster


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


Mime
View raw message