[Metadatalibrarians] xslt question
Timothy Lepczyk
tlepczyk at wustl.edu
Mon Aug 25 06:44:53 PDT 2008
Hi Greta,
I encountered that same namespace problem before. I found by putting
the namespace in (I'll use TEI as an example)
xmlns="http://www.tei-c.org/ns/1.0"> without the prefix of TEI works
fine. In this case, it just outputs the namespace at the beginning of
the document.
Also, there is this element that might help you out.
<xsl:namespace-alias stylesheet-prefix="" result-prefix=""/>
Best,
Tim
-----Original Message-----
From: metadatalibrarians-bounces at lists.monarchos.com
[mailto:metadatalibrarians-bounces at lists.monarchos.com] On Behalf Of
Greta de Groat
Sent: Sunday, August 24, 2008 11:40 AM
To: metadatalibrarians at lists.monarchos.com
Subject: [Metadatalibrarians] xslt question
Ok, i'll ask an XSLT question. Just to be clear, i'm not doing
this for my day job. I'm also volunteering at a small museum and i'm
trying to teach myself XML/XSLT/OAI by creating and exposing records
for some museum collections which i'm putting online. So there's
nobody there on staff who can help.
I'm working with an XSLT 1.0 processor, that's what i have access to
at the moment. I am trying to work with XML data exported from a
museum program called PastPerfect (thus the "ppdata" in my files), and
i'm trying to turn that into MODS. (I'll work on DC when i get this
one straight). I do get a transformation to happen, but each element
has a blank namespace declaration in it. For example:
note xmlns=""
abstract xmlns=""
etc.
And when i try to validate the resulting file (i used the validator at
http://www.validome.org/xml/) i get zillions of error messages.
So obviously i have a namespace problem. I'm trying to make a file of
records that i can expose via OAI-PMH and i don't really know what the
wrapper or header or namespace elements should look like, i've just
copied them from harvested records, and since each of those was a
little different, i didn't know how to put them together:
I put my stylesheet here:
http://www.stanford.edu/~gdegroat/TestXSLFileLatest.xsl
and the file i'm trying to transform is here
http://www.stanford.edu/~gdegroat/PPSPosters82208Edited.xml
If someone could take a look at this and give me a tip on what i'm
doing wrong, i'd be very grateful. Or if there is some sort of
template online that could tell me what these elements are supposed to
look like for a MODS or a Dublin Core record and any necessary OAI
stuff? I've looked at the OAI documentation, but it's not at a level i
can understand.
Sorry if this is too elementary!
thanks
Greta de Groat
----- End forwarded message -----
_______________________________________________
Metadatalibrarians mailing list
Metadatalibrarians at lists.monarchos.com
http://lists.monarchos.com/listinfo.cgi/metadatalibrarians-monarchos.com
More information about the Metadatalibrarians
mailing list