# HG changeset patch
# User ecology
# Date 1646604631 0
# Node ID 4a9ac1df327858bdda147cb648d81cf3bfe89b6b
"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/main/tools-ecology/tools/xmlstarlet commit 6ebe0c98dd0d727b9202422e64f6d5f7697743fb"
diff -r 000000000000 -r 4a9ac1df3278 README.md
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Sun Mar 06 22:10:31 2022 +0000
@@ -0,0 +1,1 @@
+xmlstarlet based Galaxy tool allowing to convert XML files written using a metadata standard specification to another through an xsl file.
diff -r 000000000000 -r 4a9ac1df3278 test-data/input_standardiso19115.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/input_standardiso19115.xml	Sun Mar 06 22:10:31 2022 +0000
@@ -0,0 +1,762 @@
+
+
+  
+      pyrenees
+  
+  
+      French
+  
+  
+      utf8
+  
+  
+      dataset
+  
+  
+      
+         
+            Wilfried Heintz
+         
+         
+            INRAE, UMR DYNAFOR
+         
+         
+            Engineer
+         
+         
+            
+               
+                  
+                     
+                        (+33)561285516
+                     
+                     
+                  
+               
+               
+                  
+                     
+                        24 chemin de Borde Rouge CS 52627
+                     
+                     
+                        Castanet-Tolosan
+                     
+                     
+                        31326
+                     
+                     
+                        France
+                     
+                     
+                        wilfried.heintz@inrae.fr
+                     
+                  
+               
+               
+                  
+                     
+                     
+                  
+               
+            
+         
+         
+            pointOfContact
+         
+      
+  
+  
+      2020-03-26T15:47:03
+  
+  
+      ISO 19115:2003/19139
+  
+  
+      1.0
+  
+  
+      pyrenees
+  
+  
+      
+         
+            geometryOnly
+         
+         
+            
+               
+                  surface
+               
+               
+                  91380
+               
+            
+         
+      
+  
+  
+      
+         
+            
+               
+                  2154
+               
+               
+                  EPSG
+               
+            
+         
+      
+  
+  
+      
+         
+            
+               
+                  Forêts anciennes des Pyrénées
+               
+               
+                  
+                     
+                        2012-01-27
+                     
+                     
+                        creation
+                     
+                  
+               
+               
+                  2020-03-26T15:03:07
+               
+               
+                  2020-03-26T15:47:07
+               
+               
+                  
+                     
+                        pyrenees
+                     
+                  
+               
+               
+                  
+                     
+                        Laurent Larrieu
+                     
+                     
+                        INRAE
+                     
+                     
+                        Engineer
+                     
+                     
+                        
+                           
+                              
+                                 
+                                    (+33)
+                                 
+                                 
+                              
+                           
+                           
+                              
+                                 
+                                    rue
+                                 
+                                 
+                                    ville
+                                 
+                                 
+                                    0
+                                 
+                                 
+                                    France
+                                 
+                                 
+                                    laurent.larrieu@inrae.fr
+                                 
+                              
+                           
+                           
+                              
+                                 
+                                 
+                              
+                           
+                        
+                     
+                     
+                        owner
+                     
+                  
+               
+               
+                  
+                     
+                        Wilfried Heintz
+                     
+                     
+                        INRAE, UMR DYNAFOR
+                     
+                     
+                        Engineer
+                     
+                     
+                        
+                           
+                              
+                                 
+                                    (+33)561285516
+                                 
+                                 
+                              
+                           
+                           
+                              
+                                 
+                                    24 chemin de Borde Rouge CS 52627
+                                 
+                                 
+                                    Castanet-Tolosan
+                                 
+                                 
+                                    31326
+                                 
+                                 
+                                    France
+                                 
+                                 
+                                    wilfried.heintz@inrae.fr
+                                 
+                              
+                           
+                           
+                              
+                                 
+                                 
+                              
+                           
+                        
+                     
+                     
+                        owner
+                     
+                  
+               
+               
+                  mapDigital
+               
+            
+         
+         
+            Cartographie de l'occupation ancienne du sol du massif des Pyrénées réalisée à partir de la digitalisation des minutes de cartes d'Etat Major. (2012-04-01)
+         
+         
+            
+               
+                  Wilfried Heintz
+               
+               
+                  INRAE, UMR DYNAFOR
+               
+               
+                  Engineer
+               
+               
+                  
+                     
+                        
+                           
+                              (+33)561285516
+                           
+                           
+                        
+                     
+                     
+                        
+                           
+                              24 chemin de Borde Rouge CS 52627
+                           
+                           
+                              Castanet-Tolosan
+                           
+                           
+                              31326
+                           
+                           
+                              France
+                           
+                           
+                              wilfried.heintz@inrae.fr
+                           
+                        
+                     
+                     
+                        
+                           
+                           
+                        
+                     
+                  
+               
+               
+                  metadata
+               
+            
+         
+         
+            
+               
+                  Laurent Larrieu
+               
+               
+                  INRAE
+               
+               
+                  Engineer
+               
+               
+                  
+                     
+                        
+                           
+                              (+33)
+                           
+                           
+                        
+                     
+                     
+                        
+                           
+                              rue
+                           
+                           
+                              ville
+                           
+                           
+                              0
+                           
+                           
+                              France
+                           
+                           
+                              laurent.larrieu@inrae.fr
+                           
+                        
+                     
+                     
+                        
+                           
+                           
+                        
+                     
+                  
+               
+               
+                  owner
+               
+            
+         
+         
+            
+               
+                  Wilfried Heintz
+               
+               
+                  INRAE, UMR DYNAFOR
+               
+               
+                  Engineer
+               
+               
+                  
+                     
+                        
+                           
+                              (+33)561285516
+                           
+                           
+                        
+                     
+                     
+                        
+                           
+                              24 chemin de Borde Rouge CS 52627
+                           
+                           
+                              Castanet-Tolosan
+                           
+                           
+                              31326
+                           
+                           
+                              France
+                           
+                           
+                              wilfried.heintz@inrae.fr
+                           
+                        
+                     
+                     
+                        
+                           
+                           
+                        
+                     
+                  
+               
+               
+                  owner
+               
+            
+         
+         
+            
+               
+                  Wilfried Heintz
+               
+               
+                  INRAE, UMR DYNAFOR
+               
+               
+                  Engineer
+               
+               
+                  
+                     
+                        
+                           
+                              (+33)561285516
+                           
+                           
+                        
+                     
+                     
+                        
+                           
+                              24 chemin de Borde Rouge CS 52627
+                           
+                           
+                              Castanet-Tolosan
+                           
+                           
+                              31326
+                           
+                           
+                              France
+                           
+                           
+                              wilfried.heintz@inrae.fr
+                           
+                        
+                     
+                     
+                        
+                           
+                           
+                        
+                     
+                  
+               
+               
+                  pointOfContact
+               
+            
+         
+         
+            
+               
+                  asNeeded
+               
+            
+         
+         
+            
+               
+                  https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WMS&version=1.1.0&request=GetMap&layers=pyrenees&bbox=311090.112199999,6137120.9254,714654,6269615&width=600&height=300&srs=EPSG:2154&format=image/png
+               
+               
+                  pyrenees
+               
+            
+         
+         
+            
+               
+                  http://wheintz.github.io/assets/img/Dynafor.jpg
+               
+               
+                  Logo
+               
+            
+         
+         
+            
+               
+                  Occupation du sol
+               
+               
+                  Forêts anciennes
+               
+               
+                  Digitalisation
+               
+               
+                  Pyrénées
+               
+               
+                  Minutes d'Etat Major
+               
+               
+                  theme
+               
+               
+                  
+                     
+                        GENERAL
+                     
+                     
+                        
+                           
+                              2020-03-26
+                           
+                           
+                              lastRevision
+                           
+                        
+                     
+                  
+               
+            
+         
+         
+            
+               
+                  Licence CC-By
+               
+               
+                  license
+               
+            
+         
+         
+            vector
+         
+         
+            French
+         
+         
+            utf8
+         
+         
+            
+               
+                  
+                     
+                        311090.112199999
+                     
+                     
+                        714654.00
+                     
+                     
+                        6137120.9254
+                     
+                     
+                        6269615.00
+                     
+                  
+               
+               
+                  
+                     
+                        
+                           1840
+                           1880
+                        
+                     
+                  
+               
+            
+         
+         
+      
+  
+  
+      
+         
+            
+               
+                  
+                     
+                        https://prodinra.inra.fr/record/386328
+                     
+                     
+                        WWW:LINK-1.0-http--link
+                     
+                     
+                        publication
+                     
+                     
+                        Cartographie des forêts anciennes de France - Objectifs bilan et perspectives
+                     
+                  
+               
+               
+                  
+                     
+                        https://prodinra.inra.fr/record/185677
+                     
+                     
+                        WWW:LINK-1.0-http--link
+                     
+                     
+                        publication
+                     
+                     
+                        Digitalisation et géoréférencement des cartes minutes de l'état major du Parc National des Pyrénées pour une analyse des forêts anciennes
+                     
+                  
+               
+               
+                  
+                     
+                        https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WMS
+                     
+                     
+                        OGC:WMS-1.1.0-http-get-map
+                     
+                     
+                        pyrenees
+                     
+                     
+                        Forêts anciennes des Pyrénées
+                     
+                  
+               
+               
+                  
+                     
+                        https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees
+                     
+                     
+                        WWW:LINK-1.0-http--link
+                     
+                     
+                        pyrenees
+                     
+                     
+                        Forêts anciennes des Pyrénées - GIS Data Download (GML)
+                     
+                  
+               
+               
+                  
+                     
+                        https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees&outputFormat=json
+                     
+                     
+                        WWW:LINK-1.0-http--link
+                     
+                     
+                        pyrenees
+                     
+                     
+                        Forêts anciennes des Pyrénées - GIS Data Download (GeoJSON)
+                     
+                  
+               
+               
+                  
+                     
+                        https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees&outputFormat=SHAPE-ZIP
+                     
+                     
+                        WWW:LINK-1.0-http--link
+                     
+                     
+                        pyrenees
+                     
+                     
+                        Forêts anciennes des Pyrénées - GIS Data Download (ESRI Shapefile)
+                     
+                  
+               
+            
+         
+      
+  
+  
+      
+         
+            
+               
+                  dataset
+               
+            
+         
+         
+            
+               
+                  La réalisation de cette carte en 2013 sur l’ensemble du massif pyrénéen a nécessité l’exploitation de 33 dalles minutes d’Etat-Major et un travail manuel de géoréferencement et vectorisation des polygones d'occupation des sols. Nous ne pouvons donc pas garantir les 100% de bien classés.
+               
+            
+         
+      
+  
+  
+  
+  
+  
+
\ No newline at end of file
diff -r 000000000000 -r 4a9ac1df3278 test-data/iso2eml_all_in_one.xsl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/iso2eml_all_in_one.xsl	Sun Mar 06 22:10:31 2022 +0000
@@ -0,0 +1,745 @@
+ 
+
+
+
+
+
+
+
+
+    eml://ecoinformatics.org/eml-2.1.1 ~/development/eml/eml.xsd
+    
+    
+    
+    
+    
+        
+        
+            
+        
+        
+        
+        
+            
+        
+
+        
+        
+            
+        
+
+        
+        
+            
+                
+                    
+                        
+                    
+                    
+                        
+                    
+                
+            
+        
+            
+        
+        
+                       
+        
+        
+        
+        
+            
+        
+        
+        
+        
+            
+                
+            
+        
+
+        
+        
+            
+                
+            
+        
+
+        
+        
+        
+            
+                
+                
+                    
+                        
+                    
+                
+            
+            
+                
+                
+                
+                    
+                        This work is licensed under the Creative Commons Attribution 4.0 International License.To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
+                    
+                
+                
+            
+        
+
+        
+
+        
+        
+            
+        
+        
+            
+        
+
+        
+        
+        
+            
+        
+
+        
+        
+        
+        
+        
+        
+        
+            
+        
+        
+        
+        
+    
+
+
+
+
+
+    
+    
+        
+            
+            
+                
+                    
+                    
+                    
+                        
+                    
+                    
+                
+            
+            
+                
+                    
+                        
+                            
+                        
+                    
+                    
+                        
+                            
+                        
+                    
+                
+            
+        
+    
+
+
+
+
+    
+    
+            
+            
+                
+                    
+                
+            
+            ISO 19115:2003 MD_TopicCategoryCode
+        
+    
+
+
+
+
+	
+		
+        
+        
+        
+        
+        
+    		
+                
+                    
+
+                        
+                            
+                                
+                                    
+                                                                                               
+                                                            
+                            
+                        
+
+                        
+                            
+                                
+                                    
+                                        
+                                    
+                            
+                        
+                        			
+                        
+            			    
+            			 
+                    
+                    
+                        No geographic description provided
+                        
+            			    
+            			 
+                                    
+                
+		
+    			
+    			                
+    		
+        
+		
+
+		
+
+
+    
+		Geographic coverage
+	
+	
+		
+			
+       		
+       			
+       				
+       			
+       			
+           		
+           		
+           			
+           				
+           			
+           			
+           				
+           			
+           			
+           				
+           			
+           			
+           				
+           			
+           		
+       		
+			
+		
+		
+			
+			
+			
+				
+				
+					
+						This research took place in the area bounded by: 
+						
+						 West,
+						
+						 East,
+						
+						 North,
+						
+						 South.
+					
+               		
+               		
+               			
+               				
+               			
+               			
+               				
+               			
+               			
+               				
+               			
+               			
+               				
+               			
+               		
+				
+				
+			
+		
+			
+
+
+
+
+	Temporal coverage
+	
+		
+			
+			
+			
+				
+					
+						
+							
+								
+									
+								
+																
+							
+							
+								
+									
+																
+							
+						
+					
+					
+						
+							
+								
+									
+								
+																
+							
+							
+								
+									
+																
+							
+						
+					
+				
+			
+		
+		
+			
+			
+			
+				
+				
+					
+						
+							
+						
+					
+				
+				
+			
+		
+	
+
+
+    
+    
+        
+        
+        
+        
+            
+                
+                
+
+                
+                
+                    
+                
+
+                
+                
+                    
+                    
+                        
+                            
+                                
+                                    
+                                
+                                principalInvestigator
+                            
+                        
+                    
+                    
+                    
+                        
+                            
+                                
+                                    
+                                
+                                principalInvestigator
+                            
+                        
+                    
+                    
+                    
+                        
+                            
+                                
+                                    
+                                
+                                principalInvestigator
+                            
+                        
+                    
+                
+
+                
+                
+                    
+                        
+                    
+                
+            
+        
+            
+    
+
+
+
+    
+    
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                NSF Arctic Data Center
+            
+        
+    
+
+
+
+
+    
+    
+
+    
+    
+        
+            
+                
+                    
+                        
+                    
+                    principalInvestigator
+                
+            
+        
+        
+            
+                
+                    
+                        
+                    
+                    principalInvestigator
+                
+            
+        
+    
+
+    
+    
+        
+            
+                
+                    
+                        
+                    
+                    coPrincipalInvestigator
+                
+            
+        
+        
+            
+                
+                    
+                        
+                    
+                    coPrincipalInvestigator
+                
+            
+        
+    
+
+    
+    
+        
+            
+                
+                    
+                        
+                    
+                    collaboratingPrincipalInvestigator
+                
+            
+        
+        
+            
+                
+                    
+                        
+                    
+                    collaboratingPrincipalInvestigator
+                
+            
+        
+    
+
+    
+    
+        
+            
+                
+                    
+                        
+                    
+                    originator
+                
+            
+        
+        
+            
+                
+                    
+                        
+                    
+                    originator
+                
+            
+        
+    
+
+
+
+
+
+    
+    
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+        
+        
+        
+            
+                NSF Arctic Data Center
+            
+        
+    
+
+
+
+
+    
+    
+    
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+        
+            
+                
+                    
+                        
+                    
+                
+            
+        
+    
+
+
+    
+
+    
+       
+    
+        
+    
+    
+        
+    
+    
+        
+    
+
+
+
+
+    
+        
+    
+
+
+
+
+    
+
+
+
+
+    
+
+
+
+
+
+
+
+
+
+ 
+    
+    
+        
+            
+        
+        
+            
+        
+        
+            
+        
+        
+            
+        
+        
+            
+        
+    
+    
+
+
+
diff -r 000000000000 -r 4a9ac1df3278 test-data/output_standardEML.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/output_standardEML.xml	Sun Mar 06 22:10:31 2022 +0000
@@ -0,0 +1,90 @@
+
+
+  
+    Forêts anciennes des Pyrénées
+    
+      
+        Wilfried Heintz
+      
+      INRAE, UMR DYNAFOR
+      Engineer
+      
+        24 chemin de Borde Rouge CS 52627
+        Castanet-Tolosan
+        31326
+        France
+      
+      (+33)561285516
+      wilfried.heintz@inrae.fr
+    
+    
+      
+        Wilfried Heintz
+      
+      INRAE, UMR DYNAFOR
+      Engineer
+      
+        24 chemin de Borde Rouge CS 52627
+        Castanet-Tolosan
+        31326
+        France
+      
+      (+33)561285516
+      wilfried.heintz@inrae.fr
+    
+    2020-03-26
+    
+      Cartographie de l'occupation ancienne du sol du massif des Pyrénées réalisée à partir de la digitalisation des minutes de cartes d'Etat Major. (2012-04-01)
+    
+    
+      Occupation du sol
+      Forêts anciennes
+      Digitalisation
+      Pyrénées
+      Minutes d'Etat Major
+      GENERAL
+    
+    
+      This work is licensed under the Creative Commons Attribution 4.0 International License.To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
+    
+    
+      
+      
+      
+        No geographic description provided.
+        
+          311090.112199999
+          714654.00
+          6269615.00
+          6137120.9254
+        
+      
+      
+      
+        
+          
+            1840
+          
+          
+            1880
+          
+        
+      
+    
+    
+      
+        Wilfried Heintz
+      
+      INRAE, UMR DYNAFOR
+      Engineer
+      
+        24 chemin de Borde Rouge CS 52627
+        Castanet-Tolosan
+        31326
+        France
+      
+      (+33)561285516
+      wilfried.heintz@inrae.fr
+    
+  
+
diff -r 000000000000 -r 4a9ac1df3278 xmlstarlet.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmlstarlet.xml	Sun Mar 06 22:10:31 2022 +0000
@@ -0,0 +1,54 @@
+
+    convert a metadata XML file in one standard to another
+    
+        xmlstarlet
+    
+     '$output'
+    ]]>
+    
+    
+        
+        
+    
+    
+        
+    
+    
+        
+        
+            
+            
+            
+        
+    
+    
+
+.. class:: infomark
+
+**What it does**
+
+This tool converts a xml file to another using a xsl coversion file to specify the translation to be done, from a wsd schema to another.
+
+-----
+
+**Inputs**
+
+A xml metadata file using a standard (for exemple EML, ISO19115,...) and a xsl file describing the mapping between the standard terms from input file and terms of the searched output standard.
+
+-----
+
+**Outputs**
+
+A xml metadata file using a new standard (for example ISO19115, EML, ...).
+   
+   
+       @ARTICLE{Kim07aninterior-point,
+       author = {Mikhail Grushinskiy},
+       title = {XMLStarlet Command Line XML Toolkit},
+       howpublished = "\url{http://xmlstar.sourceforge.net/}",
+       year = {2021},
+       note = "{online; accessed 08-November-2021}"
+       }
+   
+