Les balises du logiciels 'expp'

NOTA : xpp est le namespace utilisé par défaut, mais on peut le changer grâce à l'option -n, --namespace.

Détail des balises

Pour plus de détails sur chacune des balises, cliquez sur le lien propre à chacune.

Exemple de mise en oeuvre

Fichiers source

Fichier common.xcf :

<xpp:bloc>
	<xpp:define name="LinuxURL">
		<xpp:bloc>linuxfr.org</xpp:bloc>
	</xpp:define>
	<xpp:define name="WindowsURL">
		<xpp:bloc>windowsfr.org</xpp:bloc>
	</xpp:define>
	<xpp:define name="Linux">
		<xpp:bloc>
			<xpp:define name="Directory">
				<xpp:bloc>/home/dupond/</xpp:bloc>
			</xpp:define>
			<xpp:define name="RootURL">
				<xpp:expand select="LinuxURL"/>
			</xpp:define>
		</xpp:bloc>
	</xpp:define>
	<xpp:define name="Windows">
		<xpp:bloc>
			<xpp:define name="Directory">
				<xpp:bloc>c:\Documents\Dupond\</xpp:bloc>
			</xpp:define>
			<xpp:define name="RootURL">
				<xpp:expand select="WindowsURL"/>
			</xpp:define>
		</xpp:bloc>
	</xpp:define>
	<xpp:ifeq select="OS" value="Linux">
		<xpp:expand select="Linux"/>
	</xpp:ifeq>
	<xpp:ifeq select="OS" value="Windows">
		<xpp:expand select="Windows"/>
	</xpp:ifeq>
	<SomeFile>
		<xpp:expand select="Directory"/>
		<xpp:bloc>SomeFile</xpp:bloc>
	</SomeFile>
	<OtherFile>
		<xpp:expand select="Directory"/>
		<xpp:bloc>OtherFile</xpp:bloc>
	</OtherFile>
	<SomeURL>
		<xpp:bloc>http://</xpp:bloc>
		<xpp:expand select="RootURL"/>
		<xpp:bloc>/something</xpp:bloc>
	</SomeURL>
</xpp:bloc>

Fichier linux.xcf :

<?xml version="1.0" encoding="ISO-8859-1"?>
<Configuration>
	<xpp:set name="OS" value="Linux"/>
	<xpp:expand href="common.xcf"/>
</Configuration>

Fichier windows.xcf :

<?xml version="1.0" encoding="ISO-8859-1"?>
<Configuration>
	<xpp:set name="OS" value="Windows"/>
	<xpp:expand href="common.xcf"/>
</Configuration>

Résultats

En lançant la commande expp linux.xcf, on obtient le résultat suivant :

<?xml version="1.0" encoding="ISO-8859-1"?>
<Configuration>
	<SomeFile>/home/dupond/SomeFile</SomeFile>
	<OtherFile>/home/dupond/OtherFile</OtherFile>
	<SomeURL>http://linuxfr.org/something</SomeURL>
</Configuration>

En lançant la commande expp windows.xcf, on obtient le résultat suivant :

<?xml version="1.0" encoding="ISO-8859-1"?>
<Configuration>
	<SomeFile>c:\Documents\Dupond\SomeFile</SomeFile>
	<OtherFile>c:\Documents\Dupond\OtherFile</OtherFile>
	<SomeURL>http://windowsfr.org/something</SomeURL>
</Configuration>
 
software/expp/tags.txt · Dernière modification: 2007/04/10 15:19 par 217.167.194.108
 
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki