xsl-list
[Top] [All Lists]

Re: [xsl] Re: HTML table colspec and spanspec problem

2010-01-25 04:04:58
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[(_at_)colspan]">
<xsl:variable name="starting_value">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[(_at_)colspan])"
/>
</xsl:variable>
<xsl:variable name="end_value">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+(_at_)colspan) - count(preceding-sibling::td[(_at_)colspan])"
/>
</xsl:variable>
<xsl:if
test="not(parent::tr/preceding-sibling::tr/td[(_at_)colspan][count(preceding-sibling::td)+1+sum(preceding-sibling/@colspan) - count(preceding-sibling::td[(_at_)colspan])=$starting_value][count(preceding-sibling::td)+(_at_)colspan + sum(preceding-sibling/@colspan) - count(preceding-sibling::td[(_at_)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[(_at_)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[(_at_)colspan])"
/>
</xsl:variable>
<xsl:variable name="end_value_a">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+(_at_)colspan) - count(preceding-sibling::td[(_at_)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[(_at_)colspan][count(preceding-sibling::td)+1+sum(preceding-sibling/@colspan) - count(preceding-sibling::td[(_at_)colspan])=$starting_value][count(preceding-sibling::td)+(_at_)colspan + sum(preceding-sibling/@colspan) - count(preceding-sibling::td[(_at_)colspan])=$end_value])">



<xsl:element name="spanspec">
<xsl:attribute name="name">

<xsl:if test="not(preceding-sibling::td[(_at_)colspan])">
<xsl:value-of select="count(preceding-sibling::td)+1"/>
<xsl:text>to</xsl:text>
<xsl:value-of
select="(count(preceding-sibling::td)+1+(_at_)colspan)-1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[(_at_)colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[(_at_)colspan])"/>
<xsl:text>to</xsl:text>
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+(_at_)colspan) - count(preceding-sibling::td[(_at_)colspan])"
/>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="namestart">
<xsl:text>col</xsl:text>
<xsl:if test="not(preceding-sibling::td[(_at_)colspan])">
<xsl:value-of select="count(preceding-sibling::td)+1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[(_at_)colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+1+sum(preceding-sibling::td/@colspan)) - count(preceding-sibling::td[(_at_)colspan])"
/>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="nameend">
<xsl:text>col</xsl:text>
<xsl:if test="not(preceding-sibling::td[(_at_)colspan])">
<xsl:value-of
select="(count(preceding-sibling::td)+1+(_at_)colspan)-1"/>
</xsl:if>
<xsl:if test="preceding-sibling::td[(_at_)colspan]">
<xsl:value-of
select="(count(preceding-sibling::td)+sum(preceding-sibling::td/@colspan)+(_at_)colspan) - count(preceding-sibling::td[(_at_)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(_at_)lists(_dot_)mulberrytech(_dot_)com>
From: "Robby Pelssers" <robby(_dot_)pelssers(_at_)ciber(_dot_)com>
Subject: RE: [xsl] Re: HTML table colspec and spanspec problem
Message-ID:
<7C655C04B6F59643A1EF66056C0E095E034DF434(_at_)eusex01(_dot_)sweden(_dot_)ecsoft>

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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Terry Badger <terry_badger(_at_)yahoo(_dot_)com>
Subject: Re: [xsl] Re: HTML table colspec and spanspec problem
Message-ID: 
<444611(_dot_)83291(_dot_)qm(_at_)web30508(_dot_)mail(_dot_)mud(_dot_)yahoo(_dot_)com>

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[(_at_)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[(_at_)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[(_at_)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[(_at_)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[(_at_)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[(_at_)class=3D'tch'=
][not(preceding::tr[1][child::td[(_at_)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[(_at_)class= =3D'tch']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-templates select=3D"following::tr= [1][child::td[(_at_)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[(_at_)clas=
s=3D'tbtm'][not(preceding::tr[1][child::td[(_at_)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[(_at_)class=3D'tbtm']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-templates select= =3D"following::tr[1][child::td[(_at_)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[(_at_)class=3D'tb'][not(preceding::tr[1][child::td[(_at_)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[(_at_)class=3D'tb']]]">=0A=A0=A0=A0=A0=A0<xsl:apply-template=
s select=3D"following::tr[1][child::td[(_at_)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[(_at_)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[(_at_)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[(_at_)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[(_at_)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[(_at_)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)+(_at_)colspan"/>=0A=A0=A0=A0=A0=A0</xsl:if>=0A=A0=A0=A0=
=A0=A0<xsl:if test=3D"preceding-sibling::td[(_at_)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[(_at_)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[(_at_)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+(_at_)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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
CC: Michael Kay <mike(_at_)saxonica(_dot_)com>
Subject: Re: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <4B5AD719(_dot_)8050409(_at_)nag(_dot_)co(_dot_)uk>

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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Alain <alainb06(_at_)free(_dot_)fr>
Subject: Re: [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <4B5AF383(_dot_)1000204(_at_)free(_dot_)fr>

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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Dave Pawson <davep(_at_)dpawson(_dot_)co(_dot_)uk>
Subject: Re: [xsl] Re: [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <4B5AF725(_dot_)1060106(_at_)dpawson(_dot_)co(_dot_)uk>

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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Syd Bauman <Syd_Bauman(_at_)Brown(_dot_)edu>
Subject: RE: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: 
<19291(_dot_)33403(_dot_)863948(_dot_)889135(_at_)emt(_dot_)wwp(_dot_)brown(_dot_)edu>

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(_at_)lists(_dot_)mulberrytech(_dot_)com>
From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Subject: RE: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: <422DAA59F1AE446F84A7F2865C52234B(_at_)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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Vyacheslav Sedov <vyacheslav(_dot_)sedov(_at_)gmail(_dot_)com>
Subject: Re: [xsl] [MISC] How was the XSLT 2.0 norm written (tools, format)
Message-ID: 
<7ab7cbac1001232136v79faf9b5h557124c9aaf8182c(_at_)mail(_dot_)gmail(_dot_)com>

i guess OpenOffice is best authoring tool - is not it?

2010/1/24 Michael Kay <mike(_at_)saxonica(_dot_)com>:
> 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=
as
done.

Regards,

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


--~------------------------------------------------------------------
XSL-List info and archive: =C2=A0http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



------------------------------

Date: Sat, 23 Jan 2010 12:07:10 +0000
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Kevin Jones <kjouk(_at_)yahoo(_dot_)co(_dot_)uk>
Subject: Re: [xsl] What are the best XSLT 1 or XSLT 2 performance benchmarks
available today?
Message-ID: <4B5AE66E(_dot_)1030409(_at_)yahoo(_dot_)co(_dot_)uk>

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(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Frederick Yocum <frederick(_at_)frederickyocum(_dot_)com>
Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments?
Message-Id: <D02D60DC-630B-4549-91AD-AAB161370EB6(_at_)frederickyocum(_dot_)com>

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


------------------------------

Date: Sat, 23 Jan 2010 22:23:13 +0300
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Vyacheslav Sedov <vyacheslav(_dot_)sedov(_at_)gmail(_dot_)com>
Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments?
Message-ID: 
<7ab7cbac1001231123q70bba0a1w39fbb24f2ddf9c83(_at_)mail(_dot_)gmail(_dot_)com>

look like not so many of CMS support ODF as authoring tool - too bad

2010/1/23 Frederick Yocum <frederick(_at_)frederickyocum(_dot_)com>:
Symphony, using php and the web servers built-in parser, presents data wh=
ich
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. =C2=A0While the co=
re
application is deliberately simple, there is a growing batch of extension=
s
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 smal=
l-
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 XM=
L
wrapper, the primary textarea editors used in symphony-cms rely on Markdo=
wn
and SmartyPants. Using extensions you can add a rich text editor --but th=
at
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-wi=
th-xslt/
, pretty basic though, but what caught my attention was one of the comme=
nts
below mentioning about a XSLT based CMS called Symphony
http://symphony-cms.com

Anyone used this? feedbacks or comments?

Thanks,
-- Jeff


--~------------------------------------------------------------------
XSL-List info and archive: =C2=A0http://www.mulberrytech.com/xsl/xsl-lis=
t
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive: =C2=A0http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



------------------------------

Date: Sat, 23 Jan 2010 23:34:57 +0300
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Vyacheslav Sedov <vyacheslav(_dot_)sedov(_at_)gmail(_dot_)com>
Subject: Re: [xsl] Just Heard About Symphony -- Any Feedback or Comments?
Message-ID: 
<7ab7cbac1001231234v22d57746y51763c3c73915a55(_at_)mail(_dot_)gmail(_dot_)com>

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(_dot_)sedov(_at_)gmail(_dot_)com>:
look like not so many of CMS support ODF as authoring tool - too bad

2010/1/23 Frederick Yocum <frederick(_at_)frederickyocum(_dot_)com>:
Symphony, using php and the web servers built-in parser, presents data w=
hich
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. =C2=A0While the c=
ore
application is deliberately simple, there is a growing batch of extensio=
ns
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=
ll-
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 X=
ML
wrapper, the primary textarea editors used in symphony-cms rely on Markd=
own
and SmartyPants. Using extensions you can add a rich text editor --but t=
hat
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=
f,
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-w=
ith-xslt/
, pretty basic though, but what caught my attention was one of the comm=
ents
below mentioning about a XSLT based CMS called Symphony
http://symphony-cms.com

Anyone used this? feedbacks or comments?

Thanks,
-- Jeff


--~------------------------------------------------------------------
XSL-List info and archive: =C2=A0http://www.mulberrytech.com/xsl/xsl-li=
st
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive: =C2=A0http://www.mulberrytech.com/xsl/xsl-lis=
t
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




------------------------------

Date: Sun, 24 Jan 2010 02:37:14 +0100
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Hermann Stamm-Wilbrandt <STAMMW(_at_)de(_dot_)ibm(_dot_)com>
Subject: Re: [xsl] question on support of stylesheet embedding
Message-ID: <OFE96E76E5(_dot_)3C726E23-ONC12576B5(_dot_)00082BF2-C12576B5(_dot_)0008E6D0(_at_)de(_dot_)ibm(_dot_)com>

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(_dot_)Honnen(_at_)gm
            x.de>                                                      To
                                      
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
            07/15/2009 06:14                                           cc
            PM
                                                                  Subject
                                      Re: [xsl] question on support of
            Please respond to         stylesheet embedding
            xsl-list(_at_)lists(_dot_)mu
             lberrytech.com





Hermann Stamm-Wilbrandt wrote:

the spec says that embedding a stylesheet into a XML document is
possible:
http://www.w3.org/TR/xslt#section-Embedding-Stylesheets

After some searching I was able to get the cdcatalog sample below
working:
(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 browsers
supports
stylesheet 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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

------------------------------

End of xsl-list Digest
***********************************






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>