Subject:Extra TEXT!!! Author:Anne Yates Date:02 Dec 1999 07:33 AM
I have written an xsl page that uses tables to format the HTML page. When it is displayed, it put text that has not been selected between the tables. .....any suggestions?
Subject:Extra TEXT!!! Author:Omri Traub Date:02 Dec 1999 09:41 AM
Without the actual code, I can't tell for sure, but I have a guess. If you put:
(xsl:apply-templates/)
in your code, templates will be applied to ALL children of the current node. My guess is that you only wanted to apply templates to a specific element, say CUSTOMERS from which you create a table. So you can say:
(xsl:apply-templates select="CUSTOMERS"/)
Otherwise, all the other children are matched by the default templates which render them as text.
Subject:Extra TEXT!!! Author:Anne Yates Date:03 Dec 1999 08:59 AM
The only place that I find the problem is where the stylus has put in it's own template called "[Default: Text and Attributes] - text()|@* " It has as the description of the template. I can not change it at all. When I am in the html view and push on the extra text, it points to this template. All of my other template are pointed to using Any further suggestions would be appreciated. Thanks for your help so far...
Subject:Extra TEXT!!! Author:Omri Traub Date:03 Dec 1999 10:42 AM
Hi,
Yes - this [Text and Attributes] templates is one of the two default templates in XSL. The reason you can not change them is that they are built-in templates that are always present in XSL. They are included in Stylus to provide a visual component to "backmap" to from the html output.
Have you tried using the "processor trace" debugging feature? If you click on the unwanted html, you will see the (xsl:value-of) instruction you describe. Try going to the processor trace available from the Tools menu. This will let you trace the sequence of templates leading to the appearance of the output. You will be able to go back and find which (xsl:apply-templates) call caused this text to be displayed. I then suggest you refine that instruction, giving it a select expression for only those elements you want displayed.