forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: voice stylesheet and views
Date Wed, 28 Sep 2005 00:40:00 GMT
El mié, 28-09-2005 a las 09:57 +1000, David Crossley escribió:
> Thorsten Scherler wrote:
> > Ross Gardler escribi??:
> > > Thorsten Scherler wrote:
>  [ snip ]
> > > > Either way the *real* problem that you have is that the last pipe in
> > > > views is stripping the namespaces which prevent that the content of the
> > > > voice markup is rendered correctly. I did not had time (and will not in
> > > > the near future) to fix the strip_namespaces.xsl to let the voice ns
> > > > through. Sorry. For your development comment it out and build views
> > > > again.
> > > 
> > > Why do we strip namespaces? Is it safe to let the voiceML one through?
> > 
> > I cannot remember anymore exactly *why* but it had something to do with
> > validation of the xhtml output. 
> Not sure if you are talking about the Forrest core
> or the plugins.

ATM the plugins, they are overriding the core (old fashion skins).

> svn log main/webapp/skins/common/xslt/html/strip_namespaces.xsl
> ...
> FOR-541
> Also sitemap.xmap has a "fixme" note.
> The whiteboard view plugins use the same stylesheet
> but there are no clues there from 'svn log'.

AFAIR it was as well about forrest: and xi:.

El mar, 27-09-2005 a las 15:31 +0100, Ross Gardler escribió:
> If we need to strip some namespaces and not others we need a way of 
> configuring the strip-namespaces.xsl from a plugin otherwise plugin 
> developers will have to edit this XSL in core. Any sugestions how
> (or someone) can patch this namespace stripping in a more manageable
> way?

One workaround can be the following but it leads to the situation of
plugins have to patch core xsl. 

<xsl:stylesheet version="1.0"
  <xsl:output method="xhtml" version="1.0" encoding="UTF-8"
  <xsl:template match="*[not(contains(name(),'vxml'))]">
    <xsl:call-template name="removeNs"/>
  <xsl:template match="*[contains(name(),'vxml')]">
    <xsl:call-template name="keepNs"/>
  <xsl:template name="keepNs">
    <!-- do not remove element prefix (if any) -->
    <xsl:element name="{name()}"
      <!-- process attributes -->
      <xsl:for-each select="@*">
        <!-- do not remove attribute prefix (if any) -->
        <xsl:attribute name="{name()}">
          <xsl:value-of select="normalize-space(.)"/>
  <xsl:template name="removeNs">
     <!-- remove element prefix (if any) -->
    <xsl:element name="{local-name()}">
      <!-- process attributes -->
      <xsl:for-each select="@*">
        <!-- remove attribute prefix (if any) -->
        <xsl:attribute name="{local-name()}">
          <xsl:value-of select="normalize-space(.)"/>

One could generate an alias:stylesheet (dynamic xsl) that reads in a
configuration file (e.g. {theme}.fv) which defines the to excluded and
included ns. 
<forrest:ns type="include">vxml</forrest:ns>


"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message