Last active
August 29, 2015 14:14
-
-
Save guinslym/5ce47460a31fe4c4046b to your computer and use it in GitHub Desktop.
stackoverflow question:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- result I had before applying the template to check attributes on 'tuple' --> | |
<ecatalogue> | |
<tuple> | |
<ObjObjectDiscipline>Artifact;:;Artefact</ObjObjectDiscipline> | |
<ObjCatalogueNumber>1966.0224</ObjCatalogueNumber> | |
<ObjObjectName>Watch, pocket;:;Montre de poche</ObjObjectName> | |
<ObjObjectType>17 JEWELS/EXPOSED WORKS</ObjObjectType> | |
<ObjSerialNumber>06431I</ObjSerialNumber> | |
<ObjPartNo>001</ObjPartNo> | |
<ObjPartNoSum>001</ObjPartNoSum> | |
<ArtLexRank_tab> | |
<tuple> | |
<ArtLexRank>1</ArtLexRank> | |
</tuple> | |
<tuple> | |
<ArtLexRank>2</ArtLexRank> | |
</tuple> | |
<tuple> | |
<ArtLexRank>3</ArtLexRank> | |
</tuple> | |
</ArtLexRank_tab> | |
<ArtLexGroup_tab> | |
<tuple> | |
<ArtLexGroup>Horology;:;Horlogerie</ArtLexGroup> | |
</tuple> | |
</ArtLexGroup_tab> | |
<ArtLexCategory_tab> | |
<tuple> | |
<ArtLexCategory>Watches;:;Montres</ArtLexCategory> | |
</tuple> | |
</ArtLexCategory_tab> | |
<ArtLexSubCategory_tab> | |
<tuple> | |
<ArtLexSubCategory>Pocket;:;Poche</ArtLexSubCategory> | |
</tuple> | |
</ArtLexSubCategory_tab> | |
<tuple name="ObjManufacturerRef"> | |
<NamOrganisation>Unknown;:;Inconnu</NamOrganisation> | |
<NamOrganisationAcronym>Unknown</NamOrganisationAcronym> | |
<AddPhysCountry>Unknown</AddPhysCountry> | |
</tuple> | |
<ArtConFunction>SPECIALLY MADE WITH NO DIAL FACE AND A GLASS BACK SO THAT THE WORKS CAN BE SEEN FROM BOTH SIDES.</ArtConFunction> | |
<ArtCompWandDMeasurement_tab> | |
<tuple> | |
<ArtCompWandDMeasurement>Length;:;longueur</ArtCompWandDMeasurement> | |
</tuple> | |
<tuple> | |
<ArtCompWandDMeasurement>Width;:;largeur</ArtCompWandDMeasurement> | |
</tuple> | |
<tuple> | |
<ArtCompWandDMeasurement>Height;:;hauteur</ArtCompWandDMeasurement> | |
</tuple> | |
</ArtCompWandDMeasurement_tab> | |
<MulMultiMediaRef_tab> | |
<tuple> | |
<DocIdentifier_tab> | |
<tuple> | |
<DocIdentifier>http://source.techno-science.ca/images/1966.0224.001.aa.cs.jpg</DocIdentifier> | |
</tuple> | |
<tuple> | |
<DocIdentifier>http://source.techno-science.ca/images/1966.0224.001.aa.cs.thumb.jpg</DocIdentifier> | |
</tuple> | |
</DocIdentifier_tab> | |
</tuple> | |
</MulMultiMediaRef_tab> | |
<ArtDetMissing>FACE ON FRONT REMOVED AND BACK REPLACED BY GLASS TO DISPLAY WORKS.</ArtDetMissing> | |
<ArtDetFinish>POLISHED GOLD CASE/ BLACK HOUR AND MINUTE HANDS.</ArtDetFinish> | |
<NotNotes>SOURCE: PROBABLY ACQUIRED FROM BIRKS FOR NMST EXHIBITION</NotNotes> | |
<ArtRefSuppInfo>No;:;Non</ArtRefSuppInfo> | |
<ArtRefNumberRange>660223-660224</ArtRefNumberRange> | |
<ArtRefArticleNumber>MISSING</ArtRefArticleNumber> | |
<ArtRefImage_tab> | |
<tuple> | |
<ArtRefImage>Black & white negative;:;Négatif noir et blanc</ArtRefImage> | |
</tuple> | |
</ArtRefImage_tab> | |
<ArtRefReferences_tab> | |
<tuple> | |
<ArtRefReferences>SEE 660223 S.I. FOR CONSERVATION REPORT</ArtRefReferences> | |
</tuple> | |
</ArtRefReferences_tab> | |
<tuple name="LocCurrentLocationRef"> | |
<LocLevel1>2475</LocLevel1> | |
</tuple> | |
<LocIndependentlyMoveable>Yes;:;Oui</LocIndependentlyMoveable> | |
<AssConditionReport>Yes;:;Oui</AssConditionReport> | |
<AssOperable>Yes;:;Oui</AssOperable> | |
<AssRestored>No;:;Non</AssRestored> | |
<ArtCompWandDValue_tab> | |
<tuple> | |
<ArtCompWandDValue>005.8</ArtCompWandDValue> | |
</tuple> | |
<tuple> | |
<ArtCompWandDValue>004.6</ArtCompWandDValue> | |
</tuple> | |
<tuple> | |
<ArtCompWandDValue>001.0</ArtCompWandDValue> | |
</tuple> | |
</ArtCompWandDValue_tab> | |
<ArtCompWandDUnit_tab> | |
<tuple> | |
<ArtCompWandDUnit>cm</ArtCompWandDUnit> | |
</tuple> | |
<tuple> | |
<ArtCompWandDUnit>cm</ArtCompWandDUnit> | |
</tuple> | |
<tuple> | |
<ArtCompWandDUnit>cm</ArtCompWandDUnit> | |
</tuple> | |
</ArtCompWandDUnit_tab> | |
<ArtCompGeneralDescription>GOLD/ STEEL/ GLASS</ArtCompGeneralDescription> | |
<ArtCompMaterialCHINGeneral_tab> | |
<tuple> | |
<ArtCompMaterialCHINGeneral>metal;:;métal</ArtCompMaterialCHINGeneral> | |
</tuple> | |
<tuple> | |
<ArtCompMaterialCHINGeneral>metal;:;métal</ArtCompMaterialCHINGeneral> | |
</tuple> | |
<tuple> | |
<ArtCompMaterialCHINGeneral>glass;:;verre</ArtCompMaterialCHINGeneral> | |
</tuple> | |
</ArtCompMaterialCHINGeneral_tab> | |
<ArtCompMaterialCHINSpecific_tab> | |
<tuple> | |
<ArtCompMaterialCHINSpecific>gold;:;or</ArtCompMaterialCHINSpecific> | |
</tuple> | |
<tuple> | |
<ArtCompMaterialCHINSpecific>steel;:;acier</ArtCompMaterialCHINSpecific> | |
</tuple> | |
</ArtCompMaterialCHINSpecific_tab> | |
<SrcCulturalProperty>no;:;non</SrcCulturalProperty> | |
<SrcPreviousCstmcNos>DS0178</SrcPreviousCstmcNos> | |
</tuple> | |
</ecatalogue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table name="ecatalogue"> | |
<tuple> | |
<atom name="ObjObjectDiscipline">Artifact;:;Artefact</atom> | |
<atom name="ObjCatalogueNumber">1966.0224</atom> | |
<atom name="ObjObjectName">Watch, pocket;:;Montre de poche</atom> | |
<atom name="ObjObjectType">17 JEWELS/EXPOSED WORKS</atom> | |
<atom name="ObjSerialNumber">06431I</atom> | |
<atom name="ObjPartNo">001</atom> | |
<atom name="ObjPartNoSum">001</atom> | |
<table name="ArtLexRank_tab"> | |
<tuple> | |
<atom name="ArtLexRank">1</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtLexRank">2</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtLexRank">3</atom> | |
</tuple> | |
</table> | |
<table name="ArtLexGroup_tab"> | |
<tuple> | |
<atom name="ArtLexGroup">Horology;:;Horlogerie</atom> | |
</tuple> | |
</table> | |
<table name="ArtLexCategory_tab"> | |
<tuple> | |
<atom name="ArtLexCategory">Watches;:;Montres</atom> | |
</tuple> | |
</table> | |
<table name="ArtLexSubCategory_tab"> | |
<tuple> | |
<atom name="ArtLexSubCategory">Pocket;:;Poche</atom> | |
</tuple> | |
</table> | |
<tuple name="ObjManufacturerRef"> | |
<atom name="NamOrganisation">Unknown;:;Inconnu</atom> | |
<atom name="NamOrganisationAcronym">Unknown</atom> | |
<atom name="AddPhysCountry">Unknown</atom> | |
</tuple> | |
<atom name="ArtConFunction">SPECIALLY MADE WITH NO DIAL FACE AND A GLASS BACK SO THAT THE WORKS CAN BE SEEN FROM BOTH SIDES.</atom> | |
<table name="ArtCompWandDMeasurement_tab"> | |
<tuple> | |
<atom name="ArtCompWandDMeasurement">Length;:;longueur</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDMeasurement">Width;:;largeur</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDMeasurement">Height;:;hauteur</atom> | |
</tuple> | |
</table> | |
<table name="MulMultiMediaRef_tab"> | |
<tuple> | |
<table name="DocIdentifier_tab"> | |
<tuple> | |
<atom name="DocIdentifier">http://source.techno-science.ca/images/1966.0224.001.aa.cs.jpg</atom> | |
</tuple> | |
<tuple> | |
<atom name="DocIdentifier">http://source.techno-science.ca/images/1966.0224.001.aa.cs.thumb.jpg</atom> | |
</tuple> | |
</table> | |
</tuple> | |
</table> | |
<atom name="ArtDetMissing">FACE ON FRONT REMOVED AND BACK REPLACED BY GLASS TO DISPLAY WORKS.</atom> | |
<atom name="ArtDetFinish">POLISHED GOLD CASE/ BLACK HOUR AND MINUTE HANDS.</atom> | |
<atom name="NotNotes">SOURCE: PROBABLY ACQUIRED FROM BIRKS FOR NMST EXHIBITION</atom> | |
<atom name="ArtRefSuppInfo">No;:;Non</atom> | |
<atom name="ArtRefNumberRange">660223-660224</atom> | |
<atom name="ArtRefArticleNumber">MISSING</atom> | |
<table name="ArtRefImage_tab"> | |
<tuple> | |
<atom name="ArtRefImage">Black & white negative;:;Négatif noir et blanc</atom> | |
</tuple> | |
</table> | |
<table name="ArtRefReferences_tab"> | |
<tuple> | |
<atom name="ArtRefReferences">SEE 660223 S.I. FOR CONSERVATION REPORT</atom> | |
</tuple> | |
</table> | |
<tuple name="LocCurrentLocationRef"> | |
<atom name="LocLevel1">2475</atom> | |
</tuple> | |
<atom name="LocIndependentlyMoveable">Yes;:;Oui</atom> | |
<atom name="AssConditionReport">Yes;:;Oui</atom> | |
<atom name="AssOperable">Yes;:;Oui</atom> | |
<atom name="AssRestored">No;:;Non</atom> | |
<table name="ArtCompWandDValue_tab"> | |
<tuple> | |
<atom name="ArtCompWandDValue">005.8</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDValue">004.6</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDValue">001.0</atom> | |
</tuple> | |
</table> | |
<table name="ArtCompWandDUnit_tab"> | |
<tuple> | |
<atom name="ArtCompWandDUnit">cm</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDUnit">cm</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompWandDUnit">cm</atom> | |
</tuple> | |
</table> | |
<atom name="ArtCompGeneralDescription">GOLD/ STEEL/ GLASS</atom> | |
<table name="ArtCompMaterialCHINGeneral_tab"> | |
<tuple> | |
<atom name="ArtCompMaterialCHINGeneral">metal;:;métal</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompMaterialCHINGeneral">metal;:;métal</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompMaterialCHINGeneral">glass;:;verre</atom> | |
</tuple> | |
</table> | |
<table name="ArtCompMaterialCHINSpecific_tab"> | |
<tuple> | |
<atom name="ArtCompMaterialCHINSpecific">gold;:;or</atom> | |
</tuple> | |
<tuple> | |
<atom name="ArtCompMaterialCHINSpecific">steel;:;acier</atom> | |
</tuple> | |
</table> | |
<atom name="SrcCulturalProperty">no;:;non</atom> | |
<atom name="SrcPreviousCstmcNos">DS0178</atom> | |
</tuple> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" version="1.0" encoding="UTF-8" | |
indent="yes" /> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="@* | node()"> | |
<xsl:copy> | |
<xsl:apply-templates select="@* | node()" /> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="atom"> | |
<xsl:element name="{@name}"> | |
<xsl:apply-templates /> | |
</xsl:element> | |
</xsl:template> | |
<xsl:template match="table"> | |
<xsl:element name="{@name}"> | |
<xsl:apply-templates /> | |
</xsl:element> | |
</xsl:template> | |
<xsl:template match="tuple"> | |
<xsl:choose> | |
<xsl:when test="@name"> | |
<xsl:element name="{@name}"> | |
<xsl:apply-templates /> | |
</xsl:element> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:copy> | |
<xsl:apply-templates /> | |
</xsl:copy> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment