Hi Hank,
    You need to use <xsl:namespace-alias>. eg.

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
      xmlns:alt="http://www.w3.org/1999/XSL/Transform-alternate";>

<xsl:namespace-alias stylesheet-prefix="alt" result-prefix="xsl"/>
<xsl:param name="browser" select="'InternetExplorer'"/>

<xsl:template match="/">
   <alt:stylesheet>
      <xsl:choose>
         <xsl:when test="$browser='InternetExplorer'">
            <alt:import href="IERoutines.xsl"/>
            <alt:template match="/">
               <div>
                  <alt:call-template name="showTable"/>
               </div>
            </alt:template>
         </xsl:when>
         <xsl:otherwise>
            <alt:import href="OtherBrowserRoutines.xsl"/>
            <alt:template match="/">
               <div>
                  <alt:call-template name="showTable"/>
               </div>
            </alt:template>
         </xsl:otherwise>
      </xsl:choose>
   </alt:stylesheet>
</xsl:template>

</xsl:stylesheet>

----- Original Message ----- 
From: "Hank Ratzesberger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 18, 2003 6:26 AM
Subject: xslt pipeline, creating xsl on the fly


> OXF Users:
> 
> I would like to be able to integrate with Dreamweaver
> for those clients who like to make changes to pages,
> even those with dynamic content.  My idea is to insert 
> some html statements that are converted to xsl statements.
> For example:
> 
> <table>
>   <span class="for-each" id="/customer">
>   <tr>
>     <td><span id="/first-name"/></td>
>     <td><span id="/last-name"/></td>
>   </tr>
>   </span>
> </table>
> 
> would be transformed into:
> 
> <table>
>   <xsl:for-each select="/customer">
>     <tr>
>       <td><xsl:value-of select="first-name"/></td>
>       <td><xsl:value-of select="last-name"/></td>
>     </tr>
>   </xsl:for-each>
> </table>
> 
> so that when it is finally transformed with the xml 
> data, it has saved a step of writing the xsl and 
> the website owners feel like they have a little better
> handle on things.
> 
> Well, you can tell me if you think this approach is 
> reasonable.  There are a lot of issues with 
> using <span> , class and id attributes.
> 
> However, my first problem is that I cannot get 
> oxf to transform the xhtml into xsl, even though 
> it works on the xalan command line:
> 
> <xsl:stylesheet version="1.0" 
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>     xmlns:xforms="http://www.w3.org/2002/01/xforms";
>     xmlns:d="http://orbeon.org/oxf/xml/document";
>     xmlns:xhtml="http://www.w3.org/1999/xhtml";> 
>     
>     <xsl:output method="xml"/>
>      
>     <xsl:template match="/xhtml:html">
>       <xsl:element name="xsl:stylesheet" >
>         <xsl:copy-of select="."/>
>        </xsl:element>
>      </xsl:template>
>  
> </xsl:stylesheet>
> 
> The above creates an xsl doc on the command line, but is 
> blank or I get the default template behavior.  I want to 
> be able to do this on the fly.  
> 
> Happy to post with attachments a simple setup if anyone
> thinks this is a worthwhile approach.  
> 
> Thanks for any ideas,
> Hank
> 
> Institute for Crustal Studies
> _______________________________________________
> oxf-users mailing list
> [EMAIL PROTECTED]
> http://mail.orbeon.com/mailman/listinfo/oxf-users
> 
_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to