Subject: Re: [xsl] Re: HTML table colspec and spanspec problem From: "Siddhi Thakkar" <siddhi.thakkar@xxxxxxxxxxxxxx> Date: Mon, 25 Jan 2010 15:34:12 +0530 |
Hi Terry,
Thanks very much for trying this out. I am, however, slightly confused here about a few points. May I request you to help me out please?
1) What eaxctly is the role for "." in the group-by attribute of for each group? Is it grouping the items on the basis of text each td contains?
2) I couldn't even get close to how should the maximum value of align be picked?
3) I need to place all the occurences of colspecs together. Similarly, for spanspec, but if I am correct for each group will not relocate them. Please give your inputs.
I am not sure if this helps, but following is the code that I tried my hands on for spanspec but got stuck at two things: one is not getting double values for spanspecs and second is the maximum occurred value of align.. please help me in getting this code correct. This is just a template and then I am calling this inside xsl:template match="div" in the code I posted earlier. I understand all tshi is getting too lengthy, but plz plz help!!!!!
<xsl:template name="generate-spanspec">
<xsl:for-each select="table/tbody/tr/td[@colspan]">
<xsl:variable name="starting_value">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[@colspan])"
/>
</xsl:variable>
<xsl:variable name="end_value">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+@colspan) - count(preceding-sibling::td[@colspan])"
/>
</xsl:variable>
<xsl:if
test="not(parent::tr/preceding-sibling::tr/td[@colspan][count(preceding-sibling::td)+1+sum(preceding-sibling/@colspan) - count(preceding-sibling::td[@colspan])=$starting_value][count(preceding-sibling::td)+@colspan + sum(preceding-sibling/@colspan) - count(preceding-sibling::td[@colspan])=$end_value])">
<xsl:for-each select="parent::tr/following-sibling::tr"> <xsl:variable name="current_row" as="element()?" select="current()"/> <xsl:for-each select="td[@colspan]">
<xsl:variable name="starting_value_a">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[@colspan])"
/>
</xsl:variable>
<xsl:variable name="end_value_a">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+@colspan) - count(preceding-sibling::td[@colspan])"
/>
</xsl:variable>
<xsl:if
test="$starting_value_a=$starting_value and $end_value_a=$end_value and not($current_row/following-sibling::tr/td[@colspan][count(preceding-sibling::td)+1+sum(preceding-sibling/@colspan) - count(preceding-sibling::td[@colspan])=$starting_value][count(preceding-sibling::td)+@colspan + sum(preceding-sibling/@colspan) - count(preceding-sibling::td[@colspan])=$end_value])">
<xsl:element name="spanspec"> <xsl:attribute name="name">
<xsl:if test="not(preceding-sibling::td[@colspan])">
<xsl:value-of select="count(preceding-sibling::td)+1"/>
<xsl:text>to</xsl:text>
<xsl:value-of
select="(count(preceding-sibling::td)+1+@colspan)-1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[@colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[@colspan])"/>
<xsl:text>to</xsl:text>
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+@colspan) - count(preceding-sibling::td[@colspan])"
/>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="namestart">
<xsl:text>col</xsl:text>
<xsl:if test="not(preceding-sibling::td[@colspan])">
<xsl:value-of select="count(preceding-sibling::td)+1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[@colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[@colspan])"
/>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="nameend">
<xsl:text>col</xsl:text>
<xsl:if test="not(preceding-sibling::td[@colspan])">
<xsl:value-of
select="(count(preceding-sibling::td)+1+@colspan)-1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[@colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+@colspan) - count(preceding-sibling::td[@colspan])"
/>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="width"/>
</xsl:element>
</xsl:if> </xsl:for-each> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:template> >>>>> ------------------------------
Date: Fri, 22 Jan 2010 09:47:45 +0100 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> From: "Robby Pelssers" <robby.pelssers@xxxxxxxxx> Subject: RE: [xsl] Re: HTML table colspec and spanspec problem Message-ID: <7C655C04B6F59643A1EF66056C0E095E034DF434@xxxxxxxxxxxxxxxxxxxxx>
I took a look at the input and output you sent... please check yourself but the samples are totally incorrect and there is no way that xslt transforms your input into the currentoutput...
Please reply to this thread with correct INDENTED samples after you remove previous content in order to keep the mail small.
Robby Pelssers
------------------------------
Date: Sat, 23 Jan 2010 07:36:56 -0800 (PST) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Terry Badger <terry_badger@xxxxxxxxx> Subject: Re: [xsl] Re: HTML table colspec and spanspec problem Message-ID: <444611.83291.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Siddhi,=0AThis xsl will get close. Needs more work on picking the right ali=
gnment based on count.=0AXSL NEW TEMPLATE ADDED AT THE TOP=0ATerry=0A=0A<?x=
ml version=3D"1.0" encoding=3D"UTF-8"?>=0A<xsl:stylesheet xmlns:xsl=3D"http=
://www.w3.org/1999/XSL/Transform"=0A=A0xmlns:xs=3D"http://www.w3.org/2001/X=
MLSchema" exclude-result-prefixes=3D"xs" version=3D"2.0">=0A=A0<xsl:templat=
e match=3D"table">=0A=A0=A0<xsl:result-document href=3D"output.xml">=0A=A0=
=A0=A0<table>=0A=A0=A0=A0=A0<tgroup>=0A=A0=A0=A0=A0=A0<xsl:for-each-group s=
elect=3D"tbody/tr/td" group-by=3D".">=0A=A0=A0=A0=A0=A0=A0<!-- FIRST GROUP =
BY COLUMN NAME -->=0A=A0=A0=A0=A0=A0=A0<xsl:choose>=0A=A0=A0=A0=A0=A0=A0=A0=
<!-- PICK WHICH TYPE OF SPEC -->=0A=A0=A0=A0=A0=A0=A0=A0<xsl:when test=3D"c=
ontains(. , 'and')">=0A=A0=A0=A0=A0=A0=A0=A0=A0<spanspec>=0A=A0=A0=A0=A0=A0=
=A0=A0=A0=A0<xsl:attribute name=3D"name">=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0<=
xsl:value-of select=3D"substring-before(current-group()[1] , ' and ')"/>=0A=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0<xsl:text>to</xsl:text>=0A=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0<xsl:value-of select=3D"substring-after(current-group()[1] , ' =
and ')"/>=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0</xsl:attribute>=0A=A0=A0=A0=A0=A0=
=A0=A0=A0=A0<xsl:attribute name=3D"width"/>=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0<x=
sl:attribute name=3D"align" select=3D"current-group()[1]/@align"/>=0A=A0=A0=
=A0=A0=A0=A0=A0=A0=A0<xsl:attribute name=3D"namestart"=0A=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0select=3D"substring-before(current-group()[1] , ' and ')"/>=0A=
=A0=A0=A0=A0=A0=A0=A0=A0=A0<xsl:attribute name=3D"nameend" select=3D"substr=
ing-after(current-group()[1]=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0, ' and ')"/>=
=0A=A0=A0=A0=A0=A0=A0=A0=A0</spanspec>=0A=A0=A0=A0=A0=A0=A0=A0</xsl:when>=
=0A=A0=A0=A0=A0=A0=A0=A0<xsl:otherwise>=0A=A0=A0=A0=A0=A0=A0=A0=A0<colspec>=
=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0<xsl:attribute name=3D"name">=0A=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0<xsl:value-of select=3D"current-grouping-key()"/>=0A=A0=
=A0=A0=A0=A0=A0=A0=A0=A0</xsl:attribute>=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0<xsl:=
attribute name=3D"width"/>=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0<xsl:attribute name=
=3D"align" select=3D"current-group()[1]/@align"/>=0A=A0=A0=A0=A0=A0=A0=A0=
=A0</colspec>=0A=A0=A0=A0=A0=A0=A0=A0</xsl:otherwise>=0A=A0=A0=A0=A0=A0=A0<=
/xsl:choose>=0A=A0=A0=A0=A0=A0</xsl:for-each-group>=0A=A0=A0=A0=A0=A0<xsl:a=
pply-templates/>=0A=A0=A0=A0=A0</tgroup>=0A=A0=A0=A0</table>=0A=A0=A0</xsl:=
result-document>=0A=A0</xsl:template>=0A=A0<xsl:template match=3D"tbody">=
=0A=A0=A0<xsl:apply-templates/>=0A=A0</xsl:template>=0A=A0<xsl:template mat=
ch=3D"tr" mode=3D"abc">=0A=A0=A0<xsl:if test=3D"preceding::tr[1][child::td[=
@class=3D'tch']]">=0A=A0=A0=A0<row>=0A=A0=A0=A0=A0<xsl:apply-templates/>=0A=
=A0=A0=A0</row>=0A=A0=A0=A0<xsl:apply-templates select=3D"following::tr[1][=
child::td[@class=3D'tch']]" mode=3D"abc"/>=0A=A0=A0</xsl:if>=0A=A0</xsl:tem=
plate>=0A=A0<xsl:template match=3D"tr" mode=3D"def">=0A=A0=A0<xsl:if test=
=3D"preceding::tr[1][child::td[@class=3D'tbtm']]">=0A=A0=A0=A0<row>=0A=A0=
=A0=A0=A0<xsl:apply-templates/>=0A=A0=A0=A0</row>=0A=A0=A0=A0<xsl:apply-tem=
plates select=3D"following::tr[1][child::td[@class=3D'tbtm']]" mode=3D"def"=
/>=0A=A0=A0</xsl:if>=0A=A0</xsl:template>=0A=A0<xsl:template match=3D"tr" m=
ode=3D"xyz">=0A=A0=A0<xsl:if test=3D"preceding::tr[1][child::td[@class=3D't=
b']]">=0A=A0=A0=A0<row>=0A=A0=A0=A0=A0<xsl:apply-templates/>=0A=A0=A0=A0</r=
ow>=0A=A0=A0=A0<xsl:apply-templates select=3D"following::tr[1][child::td[@c=
lass=3D'tb']]" mode=3D"xyz"/>=0A=A0=A0</xsl:if>=0A=A0</xsl:template>=0A=A0<=
xsl:template match=3D"tr">=0A=A0=A0<xsl:if test=3D"child::td[@class=3D'tch'=
][not(preceding::tr[1][child::td[@class=3D'tch']])]">=0A=A0=A0=A0<thead>=0A=
=A0=A0=A0=A0<row>=0A=A0=A0=A0=A0=A0<xsl:apply-templates/>=0A=A0=A0=A0=A0</r=
ow>=0A=A0=A0=A0=A0<xsl:if test=3D"following::*[1][self::tr[child::td[@class=
=3D'tch']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-templates select=3D"following::tr=
[1][child::td[@class=3D'tch']]" mode=3D"abc"/>=0A=A0=A0=A0=A0</xsl:if>=0A=
=A0=A0=A0</thead>=0A=A0=A0</xsl:if>=0A=A0=A0<xsl:if test=3D"child::td[@clas=
s=3D'tbtm'][not(preceding::tr[1][child::td[@class=3D'tbtm']])]">=0A=A0=A0=
=A0<tfoot>=0A=A0=A0=A0=A0<row>=0A=A0=A0=A0=A0=A0<xsl:apply-templates/>=0A=
=A0=A0=A0=A0</row>=0A=A0=A0=A0=A0<xsl:if test=3D"following::*[1][self::tr[c=
hild::td[@class=3D'tbtm']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-templates select=
=3D"following::tr[1][child::td[@class=3D'tbtm']]" mode=3D"def"/>=0A=A0=A0=
=A0=A0</xsl:if>=0A=A0=A0=A0</tfoot>=0A=A0=A0</xsl:if>=0A=A0=A0<xsl:if test=
=3D"child::td[@class=3D'tb'][not(preceding::tr[1][child::td[@class=3D'tb']]=
)]">=0A=A0=A0=A0<tbody>=0A=A0=A0=A0=A0<row>=0A=A0=A0=A0=A0=A0<xsl:apply-tem=
plates/>=0A=A0=A0=A0=A0</row>=0A=A0=A0=A0=A0<xsl:if test=3D"following::*[1]=
[self::tr[child::td[@class=3D'tb']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-template=
s select=3D"following::tr[1][child::td[@class=3D'tb']]" mode=3D"xyz"/>=0A=
=A0=A0=A0=A0</xsl:if>=0A=A0=A0=A0</tbody>=0A=A0=A0</xsl:if>=0A=A0</xsl:temp=
late>=0A=0A=A0<xsl:template match=3D"td">=0A=A0=A0<entry>=0A=A0=A0=A0<xsl:a=
ttribute name=3D"class">=0A=A0=A0=A0=A0<xsl:value-of select=3D"@class"/>=0A=
=A0=A0=A0</xsl:attribute>=0A=A0=A0=A0<xsl:if test=3D"@colspan">=0A=A0=A0=A0=
=A0<xsl:attribute name=3D"colspan">=0A=A0=A0=A0=A0=A0<xsl:value-of select=
=3D"@colspan"/>=0A=A0=A0=A0=A0</xsl:attribute>=0A=A0=A0=A0</xsl:if>=0A=A0=
=A0=A0<xsl:attribute name=3D"name">=0A=A0=A0=A0=A0<xsl:text>col</xsl:text>=
=0A=A0=A0=A0=A0<xsl:if test=3D"not(@colspan)">=0A=A0=A0=A0=A0=A0<xsl:if tes=
t=3D"not(preceding-sibling::td[@colspan])">=0A=A0=A0=A0=A0=A0=A0<xsl:value-=
of select=3D"count(preceding-sibling::td)+1"/>=0A=A0=A0=A0=A0=A0</xsl:if>=
=0A=A0=A0=A0=A0=A0<xsl:if test=3D"preceding-sibling::td[@colspan]">=0A=A0=
=A0=A0=A0=A0=A0<xsl:variable name=3D"colspan_values"=0A=A0=A0=A0=A0=A0=A0=
=A0select=3D"sum(preceding-sibling::td[@colspan]/@colspan)"/>=0A=A0=A0=A0=
=A0=A0=A0<xsl:variable name=3D"td_number" select=3D"count(preceding-sibling=
::td)"/>=0A=A0=A0=A0=A0=A0=A0<xsl:variable name=3D"colspan_td_number"=0A=A0=
=A0=A0=A0=A0=A0=A0select=3D"count(preceding-sibling::td[@colspan])"/>=0A=A0=
=A0=A0=A0=A0=A0<xsl:value-of select=3D"($td_number+$colspan_values+1) - $co=
lspan_td_number"/>=0A=A0=A0=A0=A0=A0</xsl:if>=0A=A0=A0=A0=A0</xsl:if>=0A=A0=
=A0=A0=A0<xsl:if test=3D"@colspan">=0A=A0=A0=A0=A0=A0<xsl:if test=3D"not(pr=
eceding-sibling::td[@colspan])">=0A=A0=A0=A0=A0=A0=A0<xsl:value-of select=
=3D"count(preceding-sibling::td)+1"/>=0A=A0=A0=A0=A0=A0=A0<xsl:text>to</xsl=
:text>=0A=A0=A0=A0=A0=A0=A0<xsl:variable name=3D"td_number" select=3D"count=
(preceding-sibling::td)"/>=0A=A0=A0=A0=A0=A0=A0<xsl:variable name=3D"colspa=
n" select=3D"@colspan"/>=0A=A0=A0=A0=A0=A0=A0<xsl:value-of select=3D"count(=
preceding-sibling::td)+@colspan"/>=0A=A0=A0=A0=A0=A0</xsl:if>=0A=A0=A0=A0=
=A0=A0<xsl:if test=3D"preceding-sibling::td[@colspan]">=0A=A0=A0=A0=A0=A0=
=A0<xsl:variable name=3D"colspan_values"=0A=A0=A0=A0=A0=A0=A0=A0select=3D"s=
um(preceding-sibling::td[@colspan]/@colspan)"/>=0A=A0=A0=A0=A0=A0=A0<xsl:va=
riable name=3D"td_number" select=3D"count(preceding-sibling::td)"/>=0A=A0=
=A0=A0=A0=A0=A0<xsl:variable name=3D"colspan_number"=0A=A0=A0=A0=A0=A0=A0=
=A0select=3D"count(preceding-sibling::td[@colspan])"/>=0A=A0=A0=A0=A0=A0=A0=
<xsl:variable name=3D"starting_value">=0A=A0=A0=A0=A0=A0=A0=A0<xsl:value-of=
select=3D"($td_number+$colspan_values+1) - $colspan_number"/>=0A=A0=A0=A0=
=A0=A0=A0</xsl:variable>=0A=A0=A0=A0=A0=A0=A0<xsl:value-of select=3D"$start=
ing_value"/>=0A=A0=A0=A0=A0=A0=A0<xsl:text>to</xsl:text>=0A=A0=A0=A0=A0=A0=
=A0<xsl:value-of select=3D"($starting_value+@colspan) - 1"/>=0A=A0=A0=A0=A0=
=A0</xsl:if>=0A=A0=A0=A0=A0</xsl:if>=0A=A0=A0=A0</xsl:attribute>=0A=A0=A0=
=A0<xsl:apply-templates/>=0A=A0=A0</entry>=0A=A0</xsl:template>=0A=0A=A0<xs=
l:template match=3D"p">=0A=A0=A0<p>=0A=A0=A0=A0<xsl:apply-templates/>=0A=A0=
=A0</p>=0A=A0</xsl:template>=0A</xsl:stylesheet>=0A=0A=0A=0A--~--=0A=0A=0A =
------------------------------
Date: Sat, 23 Jan 2010 11:01:45 +0000
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: David Carlisle <davidc@xxxxxxxxx>
CC: Michael Kay <mike@xxxxxxxxxxxx>
Subject: Re: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <4B5AD719.8050409@xxxxxxxxx>
On 22/01/2010 23:30, Michael Kay wrote:I don't think it should
be necessary: someone added it because it was easier than fixing the source
XML and/or the stylesheets whenever the combination was found to generate
invalid HTML (which generally arises through problems of nesting paragraphs
within lists within paragraphs, etc.)
hmph the mathml version of the xmlspec stylesheets have always used grouping techniques to group the children of p elements and lift any block level children out of the p, I posted the diffs at the time(s) but I don't think they were picked up. looking at the changes there is an intersting history of grouping techniques. Originally (back in 1998/9) it used some form of sibling recursion, then I switched it to Muenchian grouping, and the current version uses for-each-group:-)
To answer the original question
Most working groups have modified version of the xmlspec dtd and stylesheets but the original guide is
http://www.w3.org/XML/1998/06/xmlspec-report-v21.htm
David
------------------------------
Date: Sat, 23 Jan 2010 14:02:59 +0100 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Alain <alainb06@xxxxxxx> Subject: Re: [MISC] How was the XSLT 2.0 norm written (tools, format) Message-ID: <4B5AF383.1000204@xxxxxxx>
Thanks Abel, and many thanks for your explainations Michael.
I suspected it was a flavour of XML/XSLT. I did the same for my own
websites, creating a semi-specific XML grammar (basically XHTML with a
limited number of "extensions") and some XSLT customised to my requirements.
But for professional use your pointer to a standard such as Docbook is much better that creating something specific from scratch, and I'll definitely promote this kind of solution.
I just hope I could also convince my boss to hire someone skilled enough
on these publication topics to advise us (better than people who think
MS-Word is the best format ever to do such publications!)
It would be a precious help as some subject like cross referencing
documentation (your explanations) might still be lacking support in Docbook.
And there's still issue to handle such as versionning (subversion?),
concurrent updating,...
Best Regards Alain BENEDETTI
------------------------------
Date: Sat, 23 Jan 2010 13:18:29 +0000
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Dave Pawson <davep@xxxxxxxxxxxxx>
Subject: Re: [xsl] Re: [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <4B5AF725.1060106@xxxxxxxxxxxxx>
On 23/01/10 13:02, Alain wrote:Thanks Abel, and many thanks for your explainations Michael.
I suspected it was a flavour of XML/XSLT. I did the same for my own
websites, creating a semi-specific XML grammar (basically XHTML with a
limited number of "extensions") and some XSLT customised to my requirements.
But for professional use your pointer to a standard such as Docbook is much better that creating something specific from scratch, and I'll definitely promote this kind of solution.
Or for a website, there is a subset of docbook specifically for that. http://wiki.docbook.org/topic/DocBookWebsites and http://www.dpawson.co.uk/docbook/website/ for the older version, or http://www.dpawson.co.uk/docbooksetup/ for a v5.0 derivative.
I just hope I could also convince my boss to hire someone skilled enough
on these publication topics to advise us (better than people who think
MS-Word is the best format ever to do such publications!)
It would be a precious help as some subject like cross referencing
documentation (your explanations) might still be lacking support in Docbook.
And there's still issue to handle such as versionning (subversion?),
concurrent updating,...
http://wiki.docbook.org/topic/DocBookDiscussion has mailing lists with some very helpful people, and all the docbook expertise there is.
regards
-- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
------------------------------
Date: Sat, 23 Jan 2010 18:12:59 -0500
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Syd Bauman <Syd_Bauman@xxxxxxxxx>
Subject: RE: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <19291.33403.863948.889135@xxxxxxxxxxxxxxxxx>
For the next version of XSLT I've also added tools that will generate SVG diagrams from source XML descriptions of trees.
Don't suppose you plan to make this snippet public?
Have you considered docbook? The xmlspec system is a bit specialized.
Seconded. Although I presonally use TEI for this sort of thing, that's because I'm so familiar with it. DocBook is probably the system best suited to general technical documentation.
------------------------------
Date: Sun, 24 Jan 2010 00:14:18 -0000
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Subject: RE: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <422DAA59F1AE446F84A7F2865C52234B@Sealion>
> For the next version of XSLT I've also added tools that will generate > SVG diagrams from source XML descriptions of trees.
Don't suppose you plan to make this snippet public?
I'll focus my efforts on getting the spec out first. Then ask me how it was
done.
Regards,
Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay
------------------------------
Date: Sun, 24 Jan 2010 08:36:52 +0300
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx>
Subject: Re: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <7ab7cbac1001232136v79faf9b5h557124c9aaf8182c@xxxxxxxxxxxxxx>
i guess OpenOffice is best authoring tool - is not it?
2010/1/24 Michael Kay <mike@xxxxxxxxxxxx>:as> For the next version of XSLT I've also added tools that will generate > SVG diagrams from source XML descriptions of trees.
Don't suppose you plan to make this snippet public?
I'll focus my efforts on getting the spec out first. Then ask me how it w=done.
Regards,
Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay
------------------------------
Date: Sat, 23 Jan 2010 12:07:10 +0000
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Kevin Jones <kjouk@xxxxxxxxxxx>
Subject: Re: [xsl] What are the best XSLT 1 or XSLT 2 performance benchmarks
available today?
Message-ID: <4B5AE66E.1030409@xxxxxxxxxxx>
I was never a fan of XSLTMark because a lot of samples have a very synthetic nature, although it didn't help that it was released by a competitor at the time. As an alternative I created XSLTBench from example uses gathered around the web in 2001, this is still the main performance benchmark used on the Intel processors although we extended it a couple of years back and also have a lot of customer cases we benchmark against as well. You can find copies of XSLTBench around although there is no official distribution point anymore.
For XSLT 2.0 we currently use a modified form of XSLTBench, we expect the comparison between 1.0 & 2.0 to be useful but we also expect that a 2.0 processor will be marginally slower on these samples. Of course there will also be samples where 2.0 does better but this is not yet the focus of our work. If anyone is interested in the XSLTBench samples, send me an email at kevin dot jones at intel dot com and I will see what we can do to release them.
Regards Kev Intel SOA Expressway team
------------------------------
Date: Sat, 23 Jan 2010 12:19:51 -0500 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Frederick Yocum <frederick@xxxxxxxxxxxxxxxxxx> Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments? Message-Id: <D02D60DC-630B-4549-91AD-AAB161370EB6@xxxxxxxxxxxxxxxxxx>
Symphony, using php and the web servers built-in parser, presents data which is held in Mysql database as xml and has a framework (if I am using the right word) for managing and applying XSLT to the XML. While the core application is deliberately simple, there is a growing batch of extensions that add more backend and some frontend functionality.
The team developing it are very active and there is a committed group of users on discussion boards. If you have XSLT skills and are building small- to medium-size Web sites it is definitely a CMS to explore.
One limitation, I think, is that while it serves up the data stored in XML wrapper, the primary textarea editors used in symphony-cms rely on Markdown and SmartyPants. Using extensions you can add a rich text editor --but that could make things worse rather better:-). If the user entered data is well-formed, you can massage it with XSLT, but that is, I think, a big if, without an XML editor to add consistent structure to the text data users are entering.
Fred
On Jan 22, 2010, at 5:04 AM, Jeff Sese wrote:
I was reading a blog about stating out on XSLT... http:// net.tutsplus.com/tutorials/html-css-techniques/getting-started-with- xslt/ , pretty basic though, but what caught my attention was one of the comments below mentioning about a XSLT based CMS called Symphony http://symphony-cms.com
Anyone used this? feedbacks or comments?
Thanks, -- Jeff
------------------------------
Date: Sat, 23 Jan 2010 22:23:13 +0300 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx> Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments? Message-ID: <7ab7cbac1001231123q70bba0a1w39fbb24f2ddf9c83@xxxxxxxxxxxxxx>
look like not so many of CMS support ODF as authoring tool - too bad
2010/1/23 Frederick Yocum <frederick@xxxxxxxxxxxxxxxxxx>:Symphony, using php and the web servers built-in parser, presents data wh=ichis held in Mysql database as xml and has a framework (if I am using there
right word) for managing and applying XSLT to the XML. =C2=A0While the co=application is deliberately simple, there is a growing batch of extension=sthat add more backend and some frontend functionality.l-
The team developing it are very active and there is a committed group of
users on discussion boards. If you have XSLT skills and are building smal=to medium-size Web sites it is definitely a CMS to explore.L
One limitation, I think, is that while it serves up the data stored in XM=wrapper, the primary textarea editors used in symphony-cms rely on Markdo=wnand SmartyPants. Using extensions you can add a rich text editor --but th=atcould make things worse rather better:-). If the user entered data is,
well-formed, you can massage it with XSLT, but that is, I think, a big if=without an XML editor to add consistent structure to the text data users =areentering.th-xslt/
Fred
On Jan 22, 2010, at 5:04 AM, Jeff Sese wrote:
I was reading a blog about stating out on XSLT... http://net.tutsplus.com/tutorials/html-css-techniques/getting-started-wi=nts, pretty basic though, but what caught my attention was one of the comme=below mentioning about a XSLT based CMS called Symphony http://symphony-cms.com
Anyone used this? feedbacks or comments?
Thanks, -- Jeff
------------------------------
Date: Sat, 23 Jan 2010 23:34:57 +0300 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx> Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments? Message-ID: <7ab7cbac1001231234v22d57746y51763c3c73915a55@xxxxxxxxxxxxxx>
well
just sample
step 1 make odf file (odt) with included date and/or time fields
step 2 go to http://cms.schematronic.org/add-content.action (it use XForms at now - so Firefox with XForms plugin - maybe Amaya - i am not sure)
step 3 fill url field (/my-own-test for example) and point to odt file upload field then press publish button
step 4 goto http://cms.schematronic.org/my-own-test (or url you entered at previous step) and see your content with current date and/or time
2010/1/23 Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx>:look like not so many of CMS support ODF as authoring tool - too badhich
2010/1/23 Frederick Yocum <frederick@xxxxxxxxxxxxxxxxxx>:Symphony, using php and the web servers built-in parser, presents data w=oreis held in Mysql database as xml and has a framework (if I am using the
right word) for managing and applying XSLT to the XML. =C2=A0While the c=nsapplication is deliberately simple, there is a growing batch of extensio=ll-that add more backend and some frontend functionality.
The team developing it are very active and there is a committed group of
users on discussion boards. If you have XSLT skills and are building sma=MLto medium-size Web sites it is definitely a CMS to explore.
One limitation, I think, is that while it serves up the data stored in X=ownwrapper, the primary textarea editors used in symphony-cms rely on Markd=hatand SmartyPants. Using extensions you can add a rich text editor --but t=f,could make things worse rather better:-). If the user entered data is
well-formed, you can massage it with XSLT, but that is, I think, a big i=arewithout an XML editor to add consistent structure to the text data users=ith-xslt/entering.
Fred
On Jan 22, 2010, at 5:04 AM, Jeff Sese wrote:
I was reading a blog about stating out on XSLT... http://net.tutsplus.com/tutorials/html-css-techniques/getting-started-w=ents, pretty basic though, but what caught my attention was one of the comm=below mentioning about a XSLT based CMS called Symphony http://symphony-cms.com
Anyone used this? feedbacks or comments?
Thanks, -- Jeff
------------------------------
Date: Sun, 24 Jan 2010 02:37:14 +0100
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Subject: Re: [xsl] question on support of stylesheet embedding
Message-ID: <OFE96E76E5.3C726E23-ONC12576B5.00082BF2-C12576B5.0008E6D0@xxxxxxxxxx>
It does not look like that is supported with IE. IE 8 when I try your test case http://www.stamm-wilbrandt.de/en/xsl-list/cdcatalog.xml seems to sniff the content and try to interpret it as text/html meaning you end up with a browser window displaying the contents of the first title element in the window bar and a table with only the header row as the contents of the document followed by any text nodes in all those unknown (to the HTML parser) elements like artist, country.
Yes, stylesheet embedding is not supported for IE6/7/8.
But I found a work around -- stylesheet "ApplyEmbeddedStylesheetIE.xsl" allows IE browsers to process embedded stylesheets!
The stylesheet may be found here: http://stamm-wilbrandt.de/en/xsl-list/ApplyEmbeddedStylesheetIE.xsl
The first comment of that stylesheet explains how this works: <!--
ApplyEmbeddedStylesheetIE.xsl (1/24/2010)
Thread "[xsl] question on support of stylesheet embedding":
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/200907/msg00144.html
identified IE6/7/8 browsers being unable to process embedded stylesheets.
While Firefox always selects the last xml-stylesheet PI the IE browsers always select the first one; this allows for a browser switch on xml-stylesheet PI level.
Results in NO performance penalties for Firefox and enables IE browsers for processing embedded stylesheets.
Samples for embedded stylesheets enabled for IE by this stylesheet: http://stamm-wilbrandt.de/en/xsl-list/cdcatalogIE.xml http://stamm-wilbrandt.de/en/xsl-list/chess/board5bIE.xml
The first xml-stylesheet PI href points to this stylesheet for IE.: The last xml-stylesheet PI href references the embedded stylesheet id. [use view (Page) Source in browser to inspect XML files]
Having an absolute href for the first xml-stylesheet PI allows for copying around of XML files with embedded stylesheets while still allowing them to be rendered by Firefox and IE browsers anytime. -->
Mit besten Gruessen / Best wishes,
Hermann Stamm-Wilbrandt Developer, XML Compiler WebSphere DataPower SOA Appliances ---------------------------------------------------------------------- IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
Martin Honnen <Martin.Honnen@gm x.de> To xsl-list@xxxxxxxxxxxxxxxxxxxxxx 07/15/2009 06:14 cc PM Subject Re: [xsl] question on support of Please respond to stylesheet embedding xsl-list@xxxxxxxx lberrytech.com
Hermann Stamm-Wilbrandt wrote:
the spec says that embedding a stylesheet into a XML document ispossible:http://www.w3.org/TR/xslt#section-Embedding-Stylesheetsworking:
After some searching I was able to get the cdcatalog sample belowsupports(http://www.stamm-wilbrandt.de/en/xsl-list/cdcatalog.xml if you want to click).
But it is working for Firefox 2/3 and Opera 9.64, NOT for MS IE6. I found neither negative nor positive statements on IE 6/7/8 support of stylesheet embedding while searching the web.
Does anybody now the answer whether any of the Microsoft browsersstylesheet embedding?
It does not look like that is supported with IE. IE 8 when I try your test case http://www.stamm-wilbrandt.de/en/xsl-list/cdcatalog.xml seems to sniff the content and try to interpret it as text/html meaning you end up with a browser window displaying the contents of the first title element in the window bar and a table with only the header row as the contents of the document followed by any text nodes in all those unknown (to the HTML parser) elements like artist, country.
--
Martin Honnen http://msmvps.com/blogs/martin_honnen/
------------------------------
End of xsl-list Digest ***********************************
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: HTML table colspec an, Terry Badger | Thread | [xsl] RE: xsl document function not, Christian C. Schoute |
Re: [xsl] [MISC] How was the XSLT 2, Eric J. Bowman | Date | [xsl] Is there a forum frontend mir, Ben Stover |
Month |