T
Tjerk Wolterink
Don't thinkt it is possible, but maybe someone knows how to do this.
I have an xml file like this:
---
<?xml version="1.0" encoding="ISO-8859-1"?>
<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml" module="agenda">
<xc:subset offset="0" max="10" count="3"/>
<xc:agendapunt>
<xc:id>1</xc:id>
<xc:title type="string"><![CDATA[Tjerk Jarig]]></xc:title>
<xc:date type="date">
<xc:day>02</xc:day>
<xc:month>08</xc:month>
<xc:year>2005</xc:year>
<xc:display>2005-08-02</xc:display>
</xc:date>
<xc:content type="html">
Ja dan ben ik jarig, blij blij blij<br/>
</xc:content>
</xc:agendapunt>
<xc:agendapunt>
<xc:id>2</xc:id>
<xc:title type="string"><![CDATA[Radstake]]></xc:title>
<xc:date type="date">
<xc:day>18</xc:day>
<xc:month>02</xc:month>
<xc:year>2005</xc:year>
<xc:display>2005-02-18</xc:display>
</xc:date>
<xc:content type="html">
Avondje stake<br/>
</xc:content>
</xc:agendapunt>
<xc:agendapunt>
<xc:id>3</xc:id>
<xc:title type="string"><![CDATA[buizen]]></xc:title>
<xc:date type="date">
<xc:day>15</xc:day>
<xc:month>02</xc:month>
<xc:year>2006</xc:year>
<xc:display>2006-02-15</xc:display>
</xc:date>
<xc:content type="html">
buizen
</xc:content>
</xc:agendapunt>
</xc:xcontent>
---
And a stylesheet like this (onlt this template):
---
<xsl:template match="/xc:xcontent">
<page
age type="module">
<page:form-messages multiple="agendapunt"/>
<page:button-new module="agenda" multiple="agendapunt"/>
<page:form-new multiple="agendapunt"/>
<page:form-edit multiple="agendapunt"/>
<xsl:for-each select="xc:agendapunt">
<page:form>
<page:header><xsl:value-of select="xc:title"/></page:header>
<page:data>
<page:name>Datum</page:name>
<page:value><xsl:value-of select="xc:date/xc:display"/></page:value>
</page:data>
<page:data>
<page:text-name>Content</page:text-name>
<page:text-value>
<xsl:value-of select="xc:content"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agendapunt"/>
</page:text-value>
</page:data>
</page:form>
</xsl:for-each>
</page
age>
</xsl:template>
---
But what i want is the following:
I want the xc:agendapunt ordered by their <xc:data element. So that the first data is shown in the first <page:form output and the last
data is shown at the bottom.
Note that the xsl stylesheet knows some integer variables that represent the current date: $time_day $time_year $time_month.
You can use them. I do'nt know how to solve this.
I have an xml file like this:
---
<?xml version="1.0" encoding="ISO-8859-1"?>
<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml" module="agenda">
<xc:subset offset="0" max="10" count="3"/>
<xc:agendapunt>
<xc:id>1</xc:id>
<xc:title type="string"><![CDATA[Tjerk Jarig]]></xc:title>
<xc:date type="date">
<xc:day>02</xc:day>
<xc:month>08</xc:month>
<xc:year>2005</xc:year>
<xc:display>2005-08-02</xc:display>
</xc:date>
<xc:content type="html">
Ja dan ben ik jarig, blij blij blij<br/>
</xc:content>
</xc:agendapunt>
<xc:agendapunt>
<xc:id>2</xc:id>
<xc:title type="string"><![CDATA[Radstake]]></xc:title>
<xc:date type="date">
<xc:day>18</xc:day>
<xc:month>02</xc:month>
<xc:year>2005</xc:year>
<xc:display>2005-02-18</xc:display>
</xc:date>
<xc:content type="html">
Avondje stake<br/>
</xc:content>
</xc:agendapunt>
<xc:agendapunt>
<xc:id>3</xc:id>
<xc:title type="string"><![CDATA[buizen]]></xc:title>
<xc:date type="date">
<xc:day>15</xc:day>
<xc:month>02</xc:month>
<xc:year>2006</xc:year>
<xc:display>2006-02-15</xc:display>
</xc:date>
<xc:content type="html">
buizen
</xc:content>
</xc:agendapunt>
</xc:xcontent>
---
And a stylesheet like this (onlt this template):
---
<xsl:template match="/xc:xcontent">
<page
<page:form-messages multiple="agendapunt"/>
<page:button-new module="agenda" multiple="agendapunt"/>
<page:form-new multiple="agendapunt"/>
<page:form-edit multiple="agendapunt"/>
<xsl:for-each select="xc:agendapunt">
<page:form>
<page:header><xsl:value-of select="xc:title"/></page:header>
<page:data>
<page:name>Datum</page:name>
<page:value><xsl:value-of select="xc:date/xc:display"/></page:value>
</page:data>
<page:data>
<page:text-name>Content</page:text-name>
<page:text-value>
<xsl:value-of select="xc:content"/>
<page:button-edit-delete module="agenda" id="{./xc:id}" multiple="agendapunt"/>
</page:text-value>
</page:data>
</page:form>
</xsl:for-each>
</page
</xsl:template>
---
But what i want is the following:
I want the xc:agendapunt ordered by their <xc:data element. So that the first data is shown in the first <page:form output and the last
data is shown at the bottom.
Note that the xsl stylesheet knows some integer variables that represent the current date: $time_day $time_year $time_month.
You can use them. I do'nt know how to solve this.