Commit 5a001d98 authored by Fremondiere Bastien's avatar Fremondiere Bastien

Removed hdoc_to_opale from mindmapping_to_opale folder

parent 1889a62b
decompressedHdoc
decompressedOpale
*.scar
*.zip
Bachimont
generateContentPath.xml
moveRessourceFiles.xml
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template name="string-to-lowercase">
<xsl:param name="lcletters">abcdefghijklmnopqrstuvwxyzeeeeaaaa</xsl:param>
<xsl:param name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZéèêëàâàá</xsl:param>
<xsl:param name="text"/>
<xsl:value-of select="translate($text,$ucletters,$lcletters)"/>
</xsl:template>
<xsl:template name="string-to-slug">
<xsl:param name="text" select="''" />
<xsl:variable name="dodgyChars" select="' ,.#_-!?*:;=+&#10;/(){}'" />
<xsl:variable name="replacementChar" select="'------------------'" />
<xsl:variable name="oneline">
<xsl:value-of select="normalize-space(translate($text,'&#10;',''))"/>
</xsl:variable>
<xsl:variable name="lowercased"><xsl:call-template name="string-to-lowercase"><xsl:with-param name="text" select="$oneline" /></xsl:call-template></xsl:variable>
<xsl:variable name="escaped"><xsl:value-of select="translate( $lowercased, $dodgyChars, $replacementChar )" /></xsl:variable>
<xsl:variable name="cleaned">
<xsl:call-template name="string-replace-caller">
<xsl:with-param name="text" select="$escaped" />
<xsl:with-param name="replace" select="'---'" />
<xsl:with-param name="by" select="'-'" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$cleaned" />
</xsl:template>
<xsl:template name="string-replace-all">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$by"/>
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="string-replace-caller">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:variable name="changed">
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="$text"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($changed,$replace)">
<xsl:call-template name="string-replace-caller">
<xsl:with-param name="text" select="$changed"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$changed"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="sp:courseUc">
<sp:courseUc>
<xsl:variable name="slug">
<xsl:call-template name="string-to-slug">
<xsl:with-param name="text" select="op:expUc/op:uM/sp:title"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="id">
<xsl:value-of select="count(preceding::sp:courseUc)+1"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="$slug"/>
</xsl:variable>
<xsl:attribute name="data-export-id">
<xsl:text>uoc-</xsl:text>
<xsl:value-of select="$id" />
</xsl:attribute>
<xsl:attribute name="data-export-file">unit-<xsl:value-of select="$id"/>.xml</xsl:attribute>
<xsl:apply-templates select="@*|node()" />
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="sp:courseUc">
<sp:courseUc>
<xsl:attribute name="sc:refUri">
<xsl:value-of select="@data-export-file" />
</xsl:attribute>
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!-- The ID of the courseUc element that needs to be copied has to be passed here -->
<xsl:param name="elementid" xsl:required="yes" xsl:as="xsl:string"/>
<xsl:template match="sc:item">
<xsl:apply-templates select=".//sp:courseUc"/>
</xsl:template>
<xsl:template match="sp:courseUc[@data-export-id = $elementid]">
<sc:item>
<!-- Once we are in the right courseUc, we can just copy everything -->
<xsl:copy-of select="./*"/>
</sc:item>
</xsl:template>
<xsl:template match="*"/>
</xsl:stylesheet>
\ No newline at end of file
tmpdir=tmp
OutputPathDivided=divided.scar
OutputPath=out.scar
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="hdoc_to_opale" basedir="." default="convert">
<property file="global.properties"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>
<target name="convert">
<!-- This is the main target : it is called whether by the project (as the default target) or by the user/converter
website, if specified in the command line. Basically, this target consists in several targets/ant buildfiles calls. -->
<antcall target="CleanDirectory"/>
<mkdir dir="${tmpdir}"/>
<antcall target="UnzipHdocFile"/>
<antcall target="validateInput" />
<antcall target="FindContentFiles"/>
<ant antfile="${tmpdir}/generateContentPath.xml"/>
<antcall target="ValidateOutput"/>
<antcall target="DivideOutput"/>
<antcall target="ZipOutput"/>
<antcall target="ZipDividedOutput"/>
<antcall target="CleanDirectory"/>
</target>
<target name="CleanDirectory">
<delete dir="${tmpdir}"/>
</target>
<target name="UnzipHdocFile">
<!-- Unzip the input hdoc file. Decompressed folder is named "decompressedHdoc" : this name is the only one which
refers to the hdoc file furthermore in this project. -->
<unzip src="${InputPath}" dest="${tmpdir}/decompressedHdoc"/>
<chmod dir="${tmpdir}/decompressedHdoc" perm="777"/>
</target>
<target name="FindContentFiles">
<!-- Finds the absolute path of container.xml and applies transformation0.xsl on it.-->
<first id="first">
<fileset
dir="${tmpdir}/decompressedHdoc/META-INF"
includes="**/container.xml"
/>
</first>
<xslt
in="${toString:first}"
out="${tmpdir}/generateContentPath.xml"
style="transformation0.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<chmod file="${tmpdir}/generateContentPath.xml" perm="777"/>
</target>
<target name="ZipOutput">
<copy file=".wspmeta" todir="${tmpdir}/decompressedOpale"/>
<mkdir dir="${tmpdir}/decompressedOpale/res"/>
<ant antfile="${tmpdir}/moveRessourceFiles.xml"/>
<zip basedir="${tmpdir}/decompressedOpale" destfile="${OutputPath}" encoding="UTF-8"/>
</target>
<target name="ZipDividedOutput">
<copy file=".wspmeta" todir="${tmpdir}/decompressedOpaleDivided"/>
<copy todir="${tmpdir}/decompressedOpaleDivided/res" >
<fileset dir="${tmpdir}/decompressedOpale/res" includes="**"/>
</copy>
<zip basedir="${tmpdir}/decompressedOpaleDivided" destfile="${OutputPathDivided}" encoding="UTF-8"/>
</target>
<!-- Validating the XML container file -->
<target name="validateInput">
<jing file="${tmpdir}/decompressedHdoc/META-INF/container.xml" rngfile="schema/hdoc1-container.rng"></jing>
</target>
<!-- Validating the XML output -->
<target name="ValidateOutput">
<jing file="${tmpdir}/decompressedOpale/main.xml" rngfile="schema/op_ue.rng"></jing>
</target>
<target name="DivideOutput">
<mkdir dir="${tmpdir}/decompressedOpaleDivided"/>
<!-- Adding IDS to the general output file -->
<xslt
in="${tmpdir}/decompressedOpale/main.xml"
out="${tmpdir}/outputWithCourseUcIds.xml"
style="addCourseUcIds.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Generating the root file (with refs to other files) -->
<xslt
in="${tmpdir}/outputWithCourseUcIds.xml"
out="${tmpdir}/decompressedOpaleDivided/main.xml"
style="addCourseUcReferences.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Generating the ANT file that will copy the files -->
<xslt
in="${tmpdir}/outputWithCourseUcIds.xml"
out="${tmpdir}/exportUnits.ant"
style="prepareCourseUcCopies.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Executing that ANT file -->
<ant antfile="${tmpdir}/exportUnits.ant"/>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>
<property file="global.properties"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!-- This template matches the root and create a ANT project, the root of any ANT buildfile. -->
<xsl:template match="h:html">
<project name="moveRessourceFiles" basedir="." default="moveRessourceFiles">
<target name="moveRessourceFiles">
<xsl:apply-templates select="./*"/>
</target>
</project>
</xsl:template>
<!-- These templates guides XSL's motor. -->
<xsl:template match="h:body">
<xsl:apply-templates select="./h:section"/>
</xsl:template>
<xsl:template match="h:section">
<xsl:apply-templates select="./h:section | ./h:div"/>
</xsl:template>
<xsl:template match="h:div">
<xsl:apply-templates select="./h:img | ./h:audio | ./h:video | ./h:object"/>
</xsl:template>
<!-- Targeted markups. -->
<xsl:template match="h:img">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:audio">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:video">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:object">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@data}" file="${{tmpdir}}/decompressedHdoc/{./@data}"/>
</xsl:template>
<!-- These markups are matched in order to minimize "apply-templates" side-effects (i.e. their contents are not relevant for this transformation). -->
<xsl:template match="h:head"/>
<xsl:template match="h:p"/>
<xsl:template match="h:em"/>
<xsl:template match="h:i"/>
<xsl:template match="h:span"/>
<xsl:template match="h:a"/>
<xsl:template match="h:ul"/>
<xsl:template match="h:ol"/>
<xsl:template match="h:li"/>
<xsl:template match="h:table"/>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="sc:item">
<project name="copy-ucs" default="main">
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>
<property file="global.properties"/>
<target name="main">
<xsl:apply-templates select=".//sp:courseUc"/>
</target>
</project>
</xsl:template>
<xsl:template match="sp:courseUc">
<xslt
in="${{tmpdir}}/outputWithCourseUcIds.xml"
out="${{tmpdir}}/decompressedOpaleDivided/{@data-export-file}"
style="copyCourseUc.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
<param name="elementid" expression="{@data-export-id}"/>
</xslt>
<jing file="${{tmpdir}}/decompressedOpaleDivided/{@data-export-file}" rngfile="schema/op_expUc.rng"></jing>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="urn:utc.fr:ics:hdoc:container"
>
<a:documentation>This schema describes the META-INF/container.xml file for hdoc format</a:documentation>
<a:documentation>This schema is a derivation of http://www.idpf.org/epub/30/schema/ocf-container-30.rnc
from EPUB Open Container Format (http://www.idpf.org/epub/30/spec/epub30-ocf.html)
</a:documentation>
<start>
<element name="container">
<attribute name="version">
<value>1.0</value>
</attribute>
<element name="rootfiles">
<element name="rootfile">
<attribute name="full-path">
<data type="anyURI"/>
</attribute>
<attribute name="media-type">
<value>text/xml</value>
</attribute>
</element>
</element>
</element>
</start>
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="op_acr"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_acr">
<sng:element name="op:acr" snga:title="Abréviation">
<snga:documentation>Insérer un descriptif détaillé pour une abréviation</snga:documentation>
<sng:ref name="op_acrM"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_acrM">
<sng:element name="op:acrM" snga:title="Entrée de l'abréviation">
<sng:element name="sp:acr" snga:title="Sigle, acronyme">
<snga:documentation>Renseigner le sigle</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
<sng:element name="sp:desc" snga:title="Signification">
<snga:documentation>Renseigner la signification</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:element>
</sng:define>
</sng:grammar>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="op_bib"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bib">
<sng:element name="op:bib" snga:title="Bibliographie">
<snga:documentation>Renseigner une bibliographie</snga:documentation>
<sng:ref name="op_bibM"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bibM">
<sng:element name="op:bibM" snga:title="Entrée de bibliographie">
<sng:element name="sp:id" snga:title="Identifiant">
<snga:documentation>Renseigner un identifiant</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
<sng:element name="sp:type" snga:title="Type">
<snga:documentation>Choisir un type de bibliographie</snga:documentation>
<sng:choice>
<sng:value type="string" snga:title="Référence webographique">web</sng:value>
<sng:value type="string" snga:title="Référence bibliographique">bib</sng:value>
</sng:choice>
</sng:element>
<sng:element name="sp:desc" snga:title="Entrée bibliographique">
<snga:documentation>Nom de l'auteur en majuscules, utilisez les balises pour définir le titre principal</snga:documentation>
<sng:ref name="op_bibTxt"/>
</sng:element>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bibTxt">
<sng:element name="op:bibTxt" snga:title="Texte">
<sng:ref name="op_bibTxt_blocs"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bibTxt_blocs">
<sng:element name="sc:para">
<sng:ref name="op_bibTxt_id"/>
<sng:ref name="op_bibTxt_inline"/>
<sng:optional>
<sng:attribute name="xml:space">
<sng:value>preserve</sng:value>
</sng:attribute>
</sng:optional>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bibTxt_inline">
<sng:zeroOrMore>
<sng:choice>
<sng:text/>
<sng:element name="sc:uLink" snga:title="Lien vers la source web">
<sng:attribute name="role">
<sng:value>url</sng:value>
</sng:attribute>
<sng:ref name="op_bibTxt_id"/>
<sng:optional>
<sng:attribute name="url">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:ref name="op_bibTxt_inline"/>
</sng:element>
<sng:element name="sc:textLeaf" snga:title="Titre principal, titre de la publication">
<sng:attribute name="role">
<sng:value>title</sng:value>
</sng:attribute>
<sng:ref name="op_bibTxt_id"/>
<sng:text/>
</sng:element>
<sng:element name="sc:textLeaf" snga:title="Auteur">
<sng:attribute name="role">
<sng:value>auth</sng:value>
</sng:attribute>
<sng:ref name="op_bibTxt_id"/>
<sng:text/>
</sng:element>
<sng:element name="sc:textLeaf" snga:title="Date">
<sng:attribute name="role">
<sng:value>date</sng:value>
</sng:attribute>
<sng:ref name="op_bibTxt_id"/>
<sng:text/>
</sng:element>
<sng:element name="sc:textLeaf" snga:title="Éditeur">
<sng:attribute name="role">
<sng:value>ed</sng:value>
</sng:attribute>
<sng:ref name="op_bibTxt_id"/>
<sng:text/>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_bibTxt_id">
<sng:optional>
<sng:attribute name="sc:id">
<sng:data type="ID"/>
</sng:attribute>
</sng:optional>
</sng:define>
</sng:grammar>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="op_code"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_code">
<sng:element name="op:code" snga:title="Listing informatique">
<sng:element name="sc:code" snga:title="">
<sng:attribute name="mimeType">
<sng:data type="string">
<sng:param name="minLength ">1</sng:param>
</sng:data>
</sng:attribute>
<sng:text/>
</sng:element>
</sng:element>
</sng:define>
</sng:grammar>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="op_gallery"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_gallery">
<sng:element name="op:gallery" snga:title="Galerie d'images">
<sng:ref name="op_galleryM"/>
<sng:oneOrMore>
<sng:element xmlns:sng="http://relaxng.org/ns/structure/1.0" name="sp:img" snga:title="Image">
<sng:choice>
<sng:group>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:empty/>
</sng:group>
<sng:empty/>
</sng:choice>
</sng:element>
</sng:oneOrMore>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="op_galleryM">
<sng:element name="op:galleryM" snga:title="Meta d'une galerie d'images">
<sng:element name="sp:title" snga:title="Titre">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:element>