You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pa...@lotus.com on 2001/03/30 20:54:41 UTC

Re: A template that creates element

Tammam,

This is where you need to utilize the <xsl:namespace-alias> element.
For details see section 7.1.1 of the spec.
http://www.w3.org/TR/xslt#literal-result-element.

Paul


                                                                                                                   
                    talhamwy@ca.i                                                                                  
                    bm.com               To:     xalan-dev@xml.apache.org                                          
                                         cc:     (bcc: Paul Dick/CAM/Lotus)                                        
                    03/30/2001           Subject:     A templage that creates <xsl:template/> element              
                    12:19 PM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xalan-dev                                                                                      
                                                                                                                   
                                                                                                                   





Hi all,

I am trying to create an <xsl:template> element, but am getting the
following exception.
I tried adding namespace to the <xsl:element> without luck.
Any ideas?

<xsl:stylesheet version="1.0" xmlns:xsl
="http://www.w3.org/1999/XSL/Transform">
 <xsl:template name="create-template">
   <xsl:element name="xsl:template">
                      ^^^^^^^^^^^^
     <xsl:attribute name="select">
       <xsl:value-of select="@blah"/>
     </xsl:attribute>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

RuntimeException: Prefix must resolve to a namespace: xsl
java.lang.RuntimeException: Prefix must resolve to a namespace: xsl
        at
org.apache.xalan.xslt.XSLTEngineImpl.isCDataResultElem(XSLTEngineImpl.java:2202)

        at
org.apache.xalan.xslt.XSLTEngineImpl.flushPending(XSLTEngineImpl.java:3763)
        at
org.apache.xalan.xslt.XSLTEngineImpl$ResultTreeHandler.endElement(XSLTEngineImpl.java:3866)

        at org.apache.xalan.xslt.ElemElement.execute(ElemElement.java:207)
        at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java:659)

        at
org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at
org.apache.xalan.xslt.ElemCallTemplate.execute(ElemCallTemplate.java:

Cheers,


Tammam Al-Hamwy