Now my current problem. Some time ago I wrote a configuration for XSLT files, based on what you kindly sent to me at that time.
My main improvement has been a CSS stylesheet that renders a tree-like view of the XSLT code, using different colors for top-level elements, other XSLT elements, and user supplied literal elements.
This stylesheet uses the attributes() extension to render the image of the attributes like a table. It works OK in XXE 5.0.0, but the result is quite unsatisfactory in XXE 5.3.0.
In a recent post to this forum you explained the reason of the change of CSS behaviour, and provided a potential solution. But I'm unsure about how to implement your solution in this particular case, because fragments of the attribute rendering are specified separately, and not as a single cell that could be declared non-wrappable.
¿Is still be possible to rely on attributes() to properly render a tabular presentation of the element's attributes?
Please find attached the CSS, a sample XSLT document, and screen capture images from XXE 5.0.0 and 5.3.0.
Thanks in advance. -- Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
@namespace xsl url(http://www.w3.org/1999/XSL/Transform); * { display: block; border: thin solid #fcc; margin: 2px 2px 2px 1em; collapsible: yes; not-collapsible-head: 1; white-space: normal; } xsl|* { border: thin solid #afa; collapsible: yes; not-collapsible-head: 1; } xsl|text { white-space: pre; background-color: #cfc; } xsl|text:before { display:none; } xsl|template { margin-top: 1em; } *:before { display:inline; color: red; content: collapser() xpath("local-name()") " " attributes(); } xsl|*:before { color: #0a0; /* font-weight: bold;*/ content: collapser() xpath("concat('xsl:',local-name(), ' ')") attributes(); } xsl|template:before, xsl|stylesheet:before { font-weight: bold; color: purple; } *::attribute { color: blue; attribute-content-left: attribute-name() "="; attribute-content-middle: cell( '"', font-weight, bold) label(color, black, attribute, attribute()) cell( '"', font-weight, bold); attribute-content-right: " "; show-attribute: when-added; }
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- .......... PLANTILLA PRINCIPAL .......... --> <xsl:template match="/"><xsl:apply-templates></xsl:apply-templates></xsl:template> <!-- .......... PLANTILLA DE DOCUMENTO .......... --> <xsl:template match="documento"><html><head><title><xsl:value-of select="titulo" /></title></head><body><h1><font color="red"><xsl:value-of select="titulo" /></font></h1><xsl:for-each select="seccion"><xsl:apply-templates select="."></xsl:apply-templates></xsl:for-each></body></html></xsl:template> <!-- .......... PLANTILLA SECCION .......... --> <xsl:template match="seccion"><blockquote><xsl:apply-templates select="titulo"></xsl:apply-templates><xsl:for-each select="parrafo"><xsl:apply-templates select="."></xsl:apply-templates></xsl:for-each><xsl:for-each select="seccion"><xsl:apply-templates select="."></xsl:apply-templates></xsl:for-each></blockquote></xsl:template> <!-- .......... PLANTILLA TITULO-SECCION .......... --> <xsl:template match="titulo"><h2><font color="blue"><xsl:number count="seccion" format="1.1. " level="multiple" /><xsl:value-of select="." /></font></h2></xsl:template> <!-- .......... PLANTILLA PARRAFO .......... --> <xsl:template match="parrafo"><p><xsl:value-of select="." /></p></xsl:template> </xsl:stylesheet>
<<attachment: xslt-5_0_0.png>>
<<attachment: xslt-5_3_0.png>>
-- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

