format-date

"Imed Bozghiba" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
 

Hello Sir, 

I would like to use module format-date but the problem that I am initial
with xslt and I did not how i can include or integrate your module into my
code. 

I would like to use the module format-date to be able to use this code:

 

 

 

<xsl:template name="print-date">

   <xsl:param name="date"/>

   <xsl:call-template name="date:format-date">

     <xsl:with-param name="date-time" select="$date" />

     <xsl:with-param name="pattern" select="'dd MMMM yyyy'" />

   </xsl:call-template>

</xsl:template>

 

I send you tree doucments, it’s my exercise, please help me please

 

 

 

 

Imed Bozghiba 

+41 78 647 66 31 

 

Pour vos séjours en Suisse :  <http://www.hebergement-du-pod.ch>
http://www.hebergement-du-pod.ch

_______________________________________________
exslt mailing list
[email protected]
http://www.exslt.org/list
ex3.xml (text/xml, 938 B)
<?xml version="1.0" encoding="UTF-8"?>
<carnet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="E:\esnig\Travail semestre\Format-Date\ex3.xsd">
	<personne>
		<nom>Bozghiba</nom>
		<prenom>Imed</prenom>
		<adresse>Rue jaquet-droz 2</adresse>
		<npa>2000</npa>
		<domicile>Neuchâtel</domicile>
		<date>1979-09-20</date>
	</personne>
	<personne>
		<nom>Hofer</nom>
		<prenom>kevin</prenom>
		<adresse>rue de maladière 10</adresse>
		<npa>1000</npa>
		<domicile>Lausanne</domicile>
		<date>1975-10-02</date>
	</personne>
	<personne>
		<nom>Schweb</nom>
		<prenom>Claude</prenom>
		<adresse>rue de parc</adresse>
		<npa>2300 </npa>
		<domicile>la chaux-de-fonds</domicile>
		<date>1970-01-10</date>
	</personne>
	<personne>
		<nom>Purro</nom>
		<prenom>Fabien</prenom>
		<adresse>Rue de lausanne</adresse>
		<npa>2000</npa>
		<domicile>Genève</domicile>
		<date>1980-10-01</date>
	</personne>
</carnet>
ex3.xsd (text/xml, 935 B)
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by CPLN (ESNIG) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="carnet">
		<xs:annotation>
			<xs:documentation>Comment describing your root element</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence maxOccurs="unbounded">
				<xs:element name="personne" type="personneType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="personneType">
		<xs:sequence>
			<xs:element name="nom" type="xs:string"/>
			<xs:element name="prenom" type="xs:string"/>
			<xs:element name="adresse" type="xs:string"/>
			<xs:element name="npa" type="xs:string"/>
			<xs:element name="domicile" type="xs:string"/>
			<xs:element name="date" type="xs:date"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
ex9-b.xslt (text/xml, 1.4 KB)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:date="http://exslt.org/dates-and-times"
                extension-element-prefixes="date">

<xsl:import href="E:\esnig\Travail semestre\Format-Date\date.format-date2\date.format-date.function.xsl" />

<!--Exercice 9.b -->	

<!--L'attribut "match" de la balise <xsl:template> permet de définir (grâce à la notation XPath) le ou les éléments du document XML sur lesquels s'applique la transformation. -->
<xsl:template match="carnet">


<!-- Indique au processeur XSL de traiter les éléments enfants directs en leur appliquant les template rules définies dans la feuille XSL. L'attribut select permet de spécifier certains éléments enfants auxquels la transformation doit être appliquée -->	

<xsl:apply-templates select="personne">  
	<xsl:sort  order="ascending" select="number(2005-number(substring-before(./date,'-')))"/>
	</xsl:apply-templates>
</xsl:template>
<!--
<xsl:template name="print-date">
   <xsl:param name="date"/>
   <xsl:call-template name="date:format-date">
     <xsl:with-param name="date-time" select="$date" />
     <xsl:with-param name="pattern" select="'dd MMMM yyyy'" />
   </xsl:call-template>
</xsl:template>
-->

	<xsl:template match="personne">
		<xsl:copy-of select="."/>
	</xsl:template>
		
</xsl:stylesheet>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.