[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: new user xslt

Subject: RE: new user xslt
From: CHAOUI Hassan <HCHAOUI@xxxxxxxxx>
Date: Mon, 29 Apr 2002 11:59:42 +0200
xsl attribut lien
This the xsl file :
 <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
	<xsl:output method="xml" omit-xml-declaration="no" indent="yes"
encoding="iso-8859-1"/>
	<xsl:template match="mydoc">
		<document>
			<xsl:apply-templates/>
		</document>
	</xsl:template>

	<xsl:template match="h1">
		<titre1>
			<xsl:apply-templates/>
		</titre1>
	</xsl:template>

	<xsl:template match="h2">
		<titre2>
			<xsl:apply-templates/>
		</titre2>
	</xsl:template>

	<xsl:template match="h3">
		<titre3>
			<xsl:apply-templates/>
		</titre3>
	</xsl:template>

	<xsl:template match="h4">
		<titre4>
			<xsl:apply-templates/>
		</titre4>
	</xsl:template>

	<xsl:template match="h5">
		<titre5>
			<xsl:apply-templates/>
		</titre5>
	</xsl:template>

	<xsl:template match="h6">
		<titre6>
			<xsl:apply-templates/>
		</titre6>
	</xsl:template>

	<xsl:template match="ht">
		<ht>
			<xsl:apply-templates/>
		</ht>
	</xsl:template>

	<xsl:template match="p">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="list[@style = &quot;bullet&quot;]">
		<bullet>
			<xsl:apply-templates/>
		</bullet>
	</xsl:template>

	<xsl:template match="list[@style = &quot;numeric&quot;]">
		<listeNumerique>
			<xsl:apply-templates/>
		</listeNumerique>
	</xsl:template>

	<xsl:template match="item">
		<liste>
			<xsl:apply-templates/>
		</liste>
	</xsl:template>

	<xsl:template match="ex">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="table" xsl:space="preserve">
		<tableau>
			<xsl:apply-templates/>
		</tableau>
	</xsl:template>

	<xsl:template match="row">
		<xsl:element name="{cell[1]}">
			<xsl:value-of select="normalize-space(cell[2])"/>
		</xsl:element>
	</xsl:template>

	<!--xsl:template match="row" xsl:space="preserve">
		<ligne>
			<xsl:apply-templates/>
		</ligne>
	</xsl:template>

	<xsl:template match="cell" xsl:space="preserve">
		<cellule>
			<xsl:apply-templates/>
		</cellule>
	</xsl:template-->

	<xsl:template match="dl">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="dd">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="dt">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="note">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="attention">
		<xsl:apply-templates/>
	</xsl:template>


	<xsl:template match="kw" xsl:space="preserve">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="link[@url]">
		<lien>
			<xsl:attribute name="href">
				<xsl:value-of select="@url"/>
			</xsl:attribute>
			<xsl:apply-templates/>
		</lien>
	</xsl:template>

	<xsl:template match="b">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="u">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="i">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="tm">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="exemple">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="graphic">
		<image>
			<xsl:attribute name="SRC">
				<xsl:value-of select="@url"/>
			</xsl:attribute>
		</image>
	</xsl:template>
</xsl:stylesheet>

and this is the xml file :

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<?xml:stylesheet type="text/xsl" href="mydoc.xsl"?>
<mydoc>
	<h1>
		<ht>Introduction :</ht>
	</h1>
	<h1>
		<ht>Historiques des évolutions :</ht>
		<h2>
			<ht>A- Evolutions de la V5.3 :</ht>
			<table>
				<row>

					<cell width="121">

						<p>Partie modifiée</p>
					</cell>
					<cell width="337">

						<p>Evolution</p>
					</cell>
				</row>

				<row>

					<cell width="121">

						<p>Identification des
règles</p>
					</cell>
					<cell width="337">

						<p>Modification de forme :
COD07 devient COD07RA</p>
					</cell>
				</row>

				<row>

					<cell width="121">

						<p>B006</p>
					</cell>
					<cell width="337">

						<p>Renvoi vers le tableau
paramètre de l'assimilation</p>
					</cell>
				</row>

				<row>

					<cell width="121">

						<p>Paramètre P008</p>
					</cell>
					<cell width="337">

						<p>Assimilation de la
formation</p>
					</cell>
				</row>
			</table>
		</h2>
	</h1>
</mydoc>

Thank for helping


+----------------------------------------------------------------+
| Ce courrier ainsi que les fichiers joints sont confidentiels.  |
| Si vous avez recu ce courrier par erreur, veuillez en informer |
| l'administrateur du systeme : exp-iris@xxxxxxxxx               |
|                          ---------                             |
| Ce message confirme que le courrier a passe le controle        |
| antivirus du relais de messagerie Internet avec succes.        |
+----------------------------------------------------------------+


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.