whitej8
asked on
Defining a namespace with in an XSLT
I am using a xsltproc to transform xml. When I execute the transform I get a series of errors that I do not understand. I will add the XSLT, initial XML and output as additional comments.
Hopefully someone will understand this.
Hopefully someone will understand this.
ASKER
<?xml version='1.0' encoding='ISO-8859-1' ?><sage>
<EMUACC>06080100PHOR00TODD WI004 </EMUACC><EMUCOLL>Witness to the Holocaust project</EMUCOLL><EMUFORMA T>Photo</E MUFORMAT>< EMUTITLE>A scaffold in Ohrdruf</EMUTITLE><DOCTYPE > EAD PUBLIC "-//Society of American Archivists//DTD ead.dtd (Encoded Archival Description (EAD))//EN" "EAD.DTD"></DOCTYPE><EAD>< EADHEADER FINDAIDSTATUS="Unverified- full-draft "><EADID>E MU 06080100PHOR00TODDWI004 </EADID><FILEDESC><TITLEST MT><TITLEP ROPER></TI TLEPROPER> </TITLESTM T></FILEDE SC></EADHE ADER><FRON TMATTER><T ITLEPAGE>< TITLEPROPE R></TITLEP ROPER><AUT HOR>Emory University</AUTHOR><ADDRES S><ADDRESS LINE>Rober t W. Woodruff Library</ADDRESSLINE><ADDR ESSLINE>Ar chives and Special Collections</ADDRESSLINE>< ADDRESSLIN E>Atlanta, GA 30322- 3870</ADDRESSLINE><ADDRESS LINE>404-7 27-6887</A DDRESSLINE ></ADDRESS ><PUBLISHE R>Encoded as part of the SAGE Digital Archive Project: A Collaborative Project between the Georgia Institute of Technology and Emory University, 1997-2000. </PUBLISHER><SPONSOR AUDIENCE="internal">Fundin g for the SAGE Digital Archive Project was provided by a local foundation. </SPONSOR></TITLEPAGE></FR ONTMATTER> <FINDAID>< ARCHDESC LANGUAGE="en" LEVEL="item" LANGMATERIAL="en"><DID></D ID><DSC TYPE="othertype"><C LEVEL="item" LANGMATERIAL="en"><DID><UN ITID>06080 100PHOR00T ODDWI004</ UNITID><UN ITTITLE>A scaffold in Ohrdruf </UNITTITLE><UNITDATE>- - </UNITDATE><GENREFORM SOURCE="LOCAL" ENCODINGANALOG="755">Photo </GENREFORM><ORIGINATION>T odd, William (Donor) <BIBREF></BIBREF></ORIGINA TION><PHYS DESC><EXTE NT>1 </EXTENT><GENREFORM SOURCE="GMGPC" ENCODINGANALOG="755">silve r gelatin print </GENREFORM><DIMENSIONS>Im age size: 4 1/2" x 6 1/2"; Paper size: 5" x 7"</DIMENSIONS><PHYSFACET> bent, scratches, damage on negative, moisture wrinkling. Reverse of photo: glue residue with black paper fibers, paper label. </PHYSFACET></PHYSDESC></D ID><SCOPEC ONTENT><HE AD>Content Note:</HEAD>A scaffold near the barracks. Three liberators stand behind it, looking at it. Numbered 76 on the reverse. </SCOPECONTENT><DAO EXT.PTR=" 06080100PHOR00TODDWI004.JP G "><DAODESC>JPG (72 dpi); 66 KB Digital image created as part of SAGE project, 1998.</DAODESC></DAO><ADMI NINFO><USE RESTRICT>R esearchers should contact the repository for terms governing the use of the collection. </USERESTRICT><ALTFORMAVAI L>Negative . TIFF image (400 dpi). JPG image (72 dpi). </ALTFORMAVAIL><PREFERCITE >[after identification of item(s)], Fred Roberts Crawford Witness to the Holocaust Project (Emory University) files, Special Collections Department, Robert W. Woodruff Library, Emory University. </PREFERCITE></ADMININFO>< CONTROLACC ESS><CORPN AME SOURCE="LCNAF">Ohrdruf (Concentration camp)</CORPNAME><GEOGNAME SOURCE=""></GEOGNAME><PERS NAME SOURCE="LOCAL">Todd, William</PERSNAME></CONTRO LACCESS><O DD></ODD>< /C></DSC>< /ARCHDESC> </FINDAID> </EAD></sa ge>
<EMUACC>06080100PHOR00TODD
ASKER
sageEAD2dc.xsl:35: warning: Namespace prefix dc is not defined
<dc:source><xsl:value-of select="."/></dc:source>
^
sageEAD2dc.xsl:39: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:43: warning: Namespace prefix dc is not defined
<dc:title><xsl:value-of select="/sage/EAD/FINDAID/ ARCHDESC/D SC/C/DID/U NITTITLE
^
sageEAD2dc.xsl:73: warning: Namespace prefix dc is not defined
<dc:publisher><xsl:value-o f select="."/></dc:publisher >
^
sageEAD2dc.xsl:92: warning: Namespace prefix dc is not defined
<dc:date><xsl:value-of select="."/></dc:date>
^
sageEAD2dc.xsl:118: warning: Namespace prefix dc is not defined
<dc:title><xsl:value-of select="."/></dc:title>
^
sageEAD2dc.xsl:122: warning: Namespace prefix dc is not defined
<dc:type><xsl:value-of select="."/></dc:type>
^
sageEAD2dc.xsl:127: warning: Namespace prefix dc is not defined
<dc:publisher><xsl:value-o f select="."/></dc:publisher >
^
sageEAD2dc.xsl:135: warning: Namespace prefix dc is not defined
<dc:format>
^
sageEAD2dc.xsl:146: warning: Namespace prefix dc is not defined
<dc:description><xsl:value -of select="."/></dc:descripti on>
^
sageEAD2dc.xsl:157: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:168: warning: Namespace prefix dc is not defined
<dc:rights><xsl:value-of select="."/></dc:rights>
^
sageEAD2dc.xsl:172: warning: Namespace prefix dc is not defined
<dc:rights><xsl:value-of select="."/></dc:rights>
^
sageEAD2dc.xsl:176: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:187: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
sageEAD2dc.xsl:191: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
sageEAD2dc.xsl:195: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
compilation error: file sageEAD2dc.xsl line 35 element source
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 39 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 43 element title
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 73 element publisher
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 92 element date
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 118 element title
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 122 element type
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 127 element publisher
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 135 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 146 element description
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 157 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 168 element rights
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 172 element rights
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 176 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 187 element subject
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 191 element subject
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 195 element subject
Namespaces prefix used for multiple namespaces
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<source>Witness to the Holocaust project</source>
<format>Photo</format>
<title>A scaffold in Ohrdruf </title>
<publisher>Emory University</publisher>
<description>Content Note:A scaffold near the barracks. Three liberators stand behind it, looking at it. Numbered 76 on the reverse. </description>
<format>JPG (72 dpi); 66 KB Digital image created as part of SAGE project, 1998.</format>
<rights>Researchers should contact the repository for terms governing the use of the collection. </rights>
<format>Negative. TIFF image (400 dpi). JPG image (72 dpi). </format>
<rights>[after identification of item(s)], Fred Roberts Crawford Witness to the Holocaust Project (Emory University) files, Special Collections Department, Robert W. Woodruff Library, Emory University. </rights>
<subject>Ohrdruf (Concentration camp)</subject>
<subject>Todd, William</subject>
</oai_dc:dc>
<dc:source><xsl:value-of select="."/></dc:source>
^
sageEAD2dc.xsl:39: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:43: warning: Namespace prefix dc is not defined
<dc:title><xsl:value-of select="/sage/EAD/FINDAID/
^
sageEAD2dc.xsl:73: warning: Namespace prefix dc is not defined
<dc:publisher><xsl:value-o
^
sageEAD2dc.xsl:92: warning: Namespace prefix dc is not defined
<dc:date><xsl:value-of select="."/></dc:date>
^
sageEAD2dc.xsl:118: warning: Namespace prefix dc is not defined
<dc:title><xsl:value-of select="."/></dc:title>
^
sageEAD2dc.xsl:122: warning: Namespace prefix dc is not defined
<dc:type><xsl:value-of select="."/></dc:type>
^
sageEAD2dc.xsl:127: warning: Namespace prefix dc is not defined
<dc:publisher><xsl:value-o
^
sageEAD2dc.xsl:135: warning: Namespace prefix dc is not defined
<dc:format>
^
sageEAD2dc.xsl:146: warning: Namespace prefix dc is not defined
<dc:description><xsl:value
^
sageEAD2dc.xsl:157: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:168: warning: Namespace prefix dc is not defined
<dc:rights><xsl:value-of select="."/></dc:rights>
^
sageEAD2dc.xsl:172: warning: Namespace prefix dc is not defined
<dc:rights><xsl:value-of select="."/></dc:rights>
^
sageEAD2dc.xsl:176: warning: Namespace prefix dc is not defined
<dc:format><xsl:value-of select="."/></dc:format>
^
sageEAD2dc.xsl:187: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
sageEAD2dc.xsl:191: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
sageEAD2dc.xsl:195: warning: Namespace prefix dc is not defined
<dc:subject><xsl:value-of select="."/></dc:subject>
^
compilation error: file sageEAD2dc.xsl line 35 element source
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 39 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 43 element title
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 73 element publisher
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 92 element date
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 118 element title
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 122 element type
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 127 element publisher
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 135 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 146 element description
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 157 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 168 element rights
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 172 element rights
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 176 element format
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 187 element subject
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 191 element subject
Namespaces prefix used for multiple namespaces
compilation error: file sageEAD2dc.xsl line 195 element subject
Namespaces prefix used for multiple namespaces
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<source>Witness to the Holocaust project</source>
<format>Photo</format>
<title>A scaffold in Ohrdruf </title>
<publisher>Emory University</publisher>
<description>Content Note:A scaffold near the barracks. Three liberators stand behind it, looking at it. Numbered 76 on the reverse. </description>
<format>JPG (72 dpi); 66 KB Digital image created as part of SAGE project, 1998.</format>
<rights>Researchers should contact the repository for terms governing the use of the collection. </rights>
<format>Negative. TIFF image (400 dpi). JPG image (72 dpi). </format>
<rights>[after identification of item(s)], Fred Roberts Crawford Witness to the Holocaust Project (Emory University) files, Special Collections Department, Robert W. Woodruff Library, Emory University. </rights>
<subject>Ohrdruf (Concentration camp)</subject>
<subject>Todd, William</subject>
</oai_dc:dc>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it thanks.
ASKER
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Sage EAD to DC transformation
Jason White
Feburary 8, 2002
Emory University General Libraries
-->
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"
<!--**********************
<xsl:template match="sage">
<oai_dc:dc
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<xsl:apply-templates select="EMUCOLL"/>
<xsl:apply-templates select="EMUFORMAT"/>
<xsl:apply-templates select="EMUTITLE"/>
<xsl:apply-templates select="EAD"/>
<xsl:apply-templates select="DAOLOC"/>
</oai_dc:dc>
</xsl:template>
<xsl:template match="DAOLOC">
<identifier><xsl:value-of select="."/></identifier>
</xsl:template>
<xsl:template match="EMUCOLL">
<dc:source><xsl:value-of select="."/></dc:source>
</xsl:template>
<xsl:template match="EMUFORMAT">
<dc:format><xsl:value-of select="."/></dc:format>
</xsl:template>
<xsl:template match="EMUTITLE">
<dc:title><xsl:value-of select="/sage/EAD/FINDAID/
</xsl:template>
<!--**********************
<xsl:template match="EAD">
<xsl:apply-templates select="EADHEADER"/>
<xsl:apply-templates select="FRONTMATTER"/>
<xsl:apply-templates select="FINDAID"/>
</xsl:template>
<!--**********************
<xsl:template match="EADHEADER">
<xsl:apply-templates select="FILEDESC"/>
</xsl:template>
<!--**********************
<xsl:template match="FILEDESC"></xsl:tem
<!--**********************
<xsl:template match="FRONTMATTER">
<xsl:apply-templates select="TITLEPAGE"/>
</xsl:template>
<!--**********************
<xsl:template match="TITLEPAGE">
<xsl:apply-templates select="TITLEPROPER"/>
<xsl:apply-templates select="AUTHOR"/>
</xsl:template>
<xsl:template match="AUTHOR">
<dc:publisher><xsl:value-o
</xsl:template>
<!--**********************
<xsl:template match="FINDAID">
<xsl:apply-templates select="ARCHDESC"/>
</xsl:template>
<!--**********************
<xsl:template match="ARCHDESC">
<xsl:apply-templates select="DID"/>
<xsl:apply-templates select="DSC"/>
</xsl:template>
<xsl:template match="DID">
<xsl:apply-templates select="UNITDATE"/>
</xsl:template>
<xsl:template match="UNITDATE">
<dc:date><xsl:value-of select="."/></dc:date>
</xsl:template>
<!--**********************
<xsl:template match="DSC">
<xsl:apply-templates select="C"/>
</xsl:template>
<!--**********************
<xsl:template match="C">
<xsl:apply-templates select="SCOPECONTENT"/>
<xsl:apply-templates select="DAO"/>
<xsl:apply-templates select="ADMININFO"/>
<xsl:apply-templates select="CONTROLACCESS"/>
<xsl:apply-templates select="ODD"/>
</xsl:template>
<!--**********************
<xsl:template match="DID">
<xsl:apply-templates select="UNITTITLE"/>
<xsl:apply-templates select="GENREFORM"/>
<xsl:apply-templates select="ORIGINATION"/>
<xsl:apply-templates select="PHYSDESC"/>
</xsl:template>
<xsl:template match="UNITTITLE">
<dc:title><xsl:value-of select="."/></dc:title>
</xsl:template>
<xsl:template match="GENREFORM">
<dc:type><xsl:value-of select="."/></dc:type>
</xsl:template>
<!--**********************
<xsl:template match="ORIGINATION">
<dc:publisher><xsl:value-o
<xsl:apply-templates select="BIBREF"/>
</xsl:template>
<xsl:template match="BIBREF"></xsl:templ
<!--**********************
<xsl:template match="PHYSDESC">
<dc:format>
<xsl:value-of select="EXTENT"/>
<xsl:value-of select="GENREFORM"/>
<xsl:value-of select="DIMENSIONS"/>
<xsl:value-of select="PHYSFACET"/>
</dc:format>
</xsl:template>
<!--**********************
<xsl:template match="SCOPECONTENT">
<xsl:apply-templates select="HEAD"/>
<dc:description><xsl:value
</xsl:template>
<xsl:template match="HEAD"></xsl:templat
<!--**********************
<xsl:template match="DAO">
<xsl:apply-templates select="DAODESC"/>
</xsl:template>
<xsl:template match="DAODESC">
<dc:format><xsl:value-of select="."/></dc:format>
</xsl:template>
<!--**********************
<xsl:template match="ADMININFO">
<xsl:apply-templates select="USERESTRICT"/>
<xsl:apply-templates select="ALTFORMAVAIL"/>
<xsl:apply-templates select="PREFERCITE"/>
</xsl:template>
<xsl:template match="USERESTRICT">
<dc:rights><xsl:value-of select="."/></dc:rights>
</xsl:template>
<xsl:template match="PREFERCITE">
<dc:rights><xsl:value-of select="."/></dc:rights>
</xsl:template>
<xsl:template match="ALTFORMAVAIL">
<dc:format><xsl:value-of select="."/></dc:format>
</xsl:template>
<!--**********************
<xsl:template match="CONTROLACCESS">
<xsl:apply-templates select="CORPNAME"/>
<xsl:apply-templates select="PREFERCITE"/>
<xsl:apply-templates select="PERSNAME"/>
</xsl:template>
<xsl:template match="CORPNAME">
<dc:subject><xsl:value-of select="."/></dc:subject>
</xsl:template>
<xsl:template match="GEOGNAME">
<dc:subject><xsl:value-of select="."/></dc:subject>
</xsl:template>
<xsl:template match="PERSNAME">
<dc:subject><xsl:value-of select="."/></dc:subject>
</xsl:template>
<!--**********************
<xsl:template match="ODD"></xsl:template
</xsl:stylesheet>