Page History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Déposez les vocabulaires fournis par UNISCIEL dans: ori-oai-md-editorvocabulary-svn/WEB-INF/resources/forms/ori-md-editor/common/xml-vocab-localconf/properties/ori_vocabularies/override

Surchargez le vocabulaire officiel : Dupliquez le vocabulaire common_lom_clas_source et renommez le en : . Pour cela, dupliquez le vocabulaire common_lom_clas_source _lille1. Placez et placez ce nouveau vocabulaire dans :ori-oai-vocabulary-svn/conf/properties/ori_vocabularies/override.

Une fois dupliqué, il faut le modifier pour déclarer les nouvelles classifications.

Déclaration des vocabulaires dans le formulaire LOM

A ce point, vous avez donc les classifications UNISCIEL, et modifié la liste déroulante pour proposer ces nouvelles classifications. ( cf première image en haut de page )

Déclaration des vocabulaires dans le formulaire LOM

Il faut à présent modifier le formulaire de l'éditeur pour afficher la fenêtre permettant de sélectionner une classification. ( cf deuxième photo en haut de page ).

Dans le formulaire LOM que vous souhaitez modifier, dans le fichier form.xhtml, déclarez ces nouveaux vocabulairesDans le formulaire LOM que vous souhaitez modifier, dans le fichier form.xhtml, modifiez l'instance nommée : classifications_source_discipline par ceci :

Code Block
<xforms:instance id="classificationschebocar_source_disciplinetaxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=common_lom_clas_discipline_source_lille1Chebocar-2.0_vdex" xxforms:readonly="true" xxforms:cache="true"/>

Déclarez ces nouveaux vocabulaires:

Code Block

<xforms:<xforms:instance id="chebocarjahe_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=ChebocarJaHe-2.0_-vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="jahejapese_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=JaHeJaPeSe-2.0-_vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="japeseSciencesHommesSocietes_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=JaPeSe-2SciencesHommesSocietes-Dewey-vdex-v1.0_vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="SciencesHommesSocietestacbaha_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=SciencesHommesSocietes-Dewey-vdex-v1TaCBaHa-2.0_vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="tacbahathokavi_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=TaCBaHaThokavi-2.0_vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="thokaviunit-informatique_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=Thokavi-2.0_Unit-informatique-vdex" xxforms:readonly="true" xxforms:cache="true"/>
<xforms:instance id="unit-informatique_taxonomie" src="/fr/service/custom/ori-md-editor/oriGetVocab?vocab=Unit-informatique-vdex" xxforms:readonly="true" xxforms:cache="true"/>   >      

Modification du formulaire LOM

Dans le fichier case-classification.xml:

Wiki MarkupEn dessous du bloc «Dewey22{^}e^ éd» ( bloc commençant par: En dessous du bloc «Dewey22e éd» ( bloc commençant par: <xforms:group ref=".\[../lom:source/lom:string = 'CDD 22e éd.'\]">), ajouter ces lignes ( [télécharger le fichier correspondant au code suivant si besoin|^case-classification.xml] ):

Code Block
<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification Chebocar')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-chebocar-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification JaHe')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-jahe-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification JaPeSe')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-japese-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification SciencesHommesSocietes')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-SciencesHommesSocietes-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification TaCBaHa')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-tacbaha-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification Thokavi')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-thokavi-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

<xforms:group ref=".[starts-with(../lom:source/lom:string, 'Classification Unit-informatique')]">
<xforms:trigger appearance="minimal">
<xforms:label>
<img src="/forms/ori-md-editor/media/images/list.gif"/>
<span> <xforms:output value="$fr-resources/ori-taxonomy-search-title"/></span>
</xforms:label>
<xforms:action ev:event="DOMActivate">
<!- Remember position of the taxon to edit ->
<xforms:setvalue ref="xxforms:instance('taxonomy-search')/taxon-position" value="count(xxforms:repeat-current()/preceding::lom:taxon) + 1"/>
<!- Open the taxonomy search dialog ->
<xxforms:show dialog="search-unit-informatique-taxonomy-dialog"/>
</xforms:action>
</xforms:trigger>
<xforms:output value="lom:id">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.1"/>
</xforms:output>
<xforms:group ref="lom:entry">
<xforms:repeat nodeset="lom:string">
<xforms:output value=".">
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>
>
<widget:labels instance="i18n_lom" termIdentifier="9.2.2.2"/>
</xforms:output>
</xforms:repeat>
</xforms:group>
</xforms:group>

Vous venez donc, pour chaque classification, dis que il faut ouvrir une fenetre pour sélectionner la matière. Seulement, il y aura toujours la possibilité de mettre le chemin taxon à la main. Comme il y aura une fenetre pour le faire, cela ne sert plus à rien.

Remplacez la ligne commençant par:

Code Block

<!-- Case where values are entered by hand -->
<xforms:group ref=".[not(starts-with(../lom:source/lom:string[@language = 'fre'][1], 'Universités Numériques Thématiques'))

Par celle-ciRemplacez la ligne commençant par:

Code Block
<xforms:group ref=".[.[not(starts-with(../lom:source/lom:string[@language = 'fre'][1], 'Universités Numériques Thématiques')) and not(../lom:source/lom:string[@language = 'fre'] = ('Classification UNIT', 'CDDClassification 22e100 éd.'

Par celle-ci:

Code Block

<xforms:group ref=".[Dewey')) and not(../lom:source/lom:string = ('Classification UNIT', 'CDD 22e éd.', 'Classification ChebocarCheBoCar v2.0', 'Classification JaHe v2.0', 'Classification JaPeSe v2.0', 'Classification SciencesHommesSocietes v1.0', 'Classification TaCBaHa v2.0', 'Classification Thokavi v2.0', 'Classification Unit-informatique')) and not(starts-with(../lom:source/lom:string, 'Universités Numériques Thématiques'))]">

Création des boites de dialogue

En regardant les lignes précédemment ajoutées, vous vous rendrez compte que l’on avez donc fait appel aux vocabulaires mais aussi à des fenêtres de dialogue. Seulement, les fenetres sont appelées, mais n'existent pas. Télécharger ce fichier et mettez-les à la racine du votre formulaire.

...