[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Parsing problem + unknown in built xsl template appearance while debugging


Subject: RE: [xsl] Parsing problem + unknown in built xsl template appearance while debugging
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 20 Jun 2006 11:41:54 +0100

If you do an xsl:apply-templates selecting a node for which there is no
explicit template rule, a built-in default rule gets invoked.

If you are getting different behaviour in XMLSpy from other processors,
that's a matter for the vendor's support channel.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Karl [mailto:call14@xxxxxxxxx]
> Sent: 20 June 2006 11:24
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Parsing problem + unknown in built xsl
> template appearance while debugging
>
> Hello,
>
> I have a valid xml and was trying to render an html output
> using an xsl file. The xml-xsl produces output if I do it
> thro stylus studio or MS-Word. However, if I use xmlspy!&s
> !'xsl transformation!( option, it hangs.
>
> But when tried using debugging, I can see it works thro (not
> completely tested as the file is big) and to my surprise
> notices it jumps to a !'Built in templates!( for a
> <xsl:apply-templates/>. My Q is
> 1.	From where this built in templates comes, as this
> section of code
> is never appears in my file and neither do I include or
> import any other xsl.
> 2.	Why this transformation fails on xmlspy !'xsl transformation!(
> option not looks like working if I use debug option (well I
> degugged only half the file).
>
> Thanks,
> karl
>
> My xsl page:
> <xsl:transform version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:ns0="'ou'"> <xsl:output method="html"
> encoding="ASCII"/> <xsl:template match="/">
>     <html><head><title></title>
>     <link rel="stylesheet" href="preview.css"/></head>
>   <p class="Disclaimer">This is a preview within a browser.
> It is only indicative of what the final output will be and
> should not be taken to be a true representation. Use the 'PDF
> Proof' button for a page proof.</p>
>   <!-- -->
>   <div class="TitleHead">
>     <div class="TitleLogo"><img src="oubslogo120h.gif"
> alt="OUBS logo"/></div>
>   </div>
>   <!-- -->
>     <xsl:apply-templates/> <!!Xwhile debugging, this JUMPS TO
> BUILT IN TEMPLATES shown BELOW 3</html> </xsl:template>
> !K.. TO MORE THAN 1030 LINE OF CODE
>
> The BUILT IN TEMPLATES codes are:
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>             <xsl:template match="*|/">
>                         <xsl:apply-templates/>
>             </xsl:template>
>             <xsl:template match="text()|@*">
>                         <xsl:value-of select="."/>
>             </xsl:template>
>             <xsl:template match="*|/" mode="?">
>                         <xsl:apply-templates mode="?"/>
>             </xsl:template>
>             <xsl:template match="text()|@*" mode="?">
>                         <xsl:value-of select="."/>
>             </xsl:template>
>             <xsl:template
> match="processing-instruction()|comment()"/>
>             <xsl:template match="processing-instruction()|comment()"
> mode="?"/>
> </xsl:stylesheet>
>
>
>
>
>
> ___________________________________________________________
> All new Yahoo! Mail "The new Interface is stunning in its
> simplicity and ease of use." - PC Magazine
> http://uk.docs.yahoo.com/nowyoucan.html


Current Thread
Keywords