>
Does this mean that I can post online a XML EAD file
that has a stylesheet declaration
> and the client browser will present the EAD in html?
Yep,
exactly. The stylesheet declaration goes right at the top; the simplest
version looks like this:
<?xml-stylesheet type="text/xsl"
href="eadcbs6-su1.xsl"?>
So
the top two lines of your file look something like this:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl"
href="eadcbs6-su1.xsl"?>
[followed by the DOCTYPE declaration and the rest of file…]
If
the style sheet is in a different directory from the EAD, change the href
accordingly. One thing to be aware of: if someone does “view source”
on the rendered HTML, they’ll see the source XML (the full EAD file), so
if you have for example appraisal information that you normally suppress from
the HTML output, people will still be able to get at it.
Here’s
an example http://library.syr.edu/digital/guides/marac/xml_files/aaa_template.xml
. Right click > view source and you can see the source EAD with the
style file called out at the top.
Michele
From: Encoded Archival
Description List [mailto:[log in to unmask]] On Behalf Of Franks, Russell
Sent: Friday, November 06, 2009 1:30 PM
To: [log in to unmask]
Subject: Re: Accented characters
Hello all,
I never realized by declaring the stylesheets in the XML
declaration that FF or IE would apply the stylesheet. Does this mean that
I can post online a XML EAD file that has a stylesheet declaration and the
client browser will present the EAD in html? Can someone give me an
example of how to do this? My XML declarations look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd
(Encoded Archival Description (EAD) Version 2002)//EN"
"/eadcb/shared/ead/ead.dtd">
And for the XSL stylesheet, like this:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon" doctype-public="-//W3C//DTD
HTML 4.0 Transitional//EN" version="1.1">
<xsl:strip-space elements="*"/>
<xsl:output encoding="ISO-8859-1"
method="html" doctype-public="-//W3C//DTD HTML 4.0
Transitional//EN" version="1.1" />
We also rely heavily on css as well after making the XSL
transformation to html.
Any examples would greatly helpful.
Many thanks,
Russell Franks
Librarian
Special and Archival Collections
Phillips Memorial Library
Providence College
1 Cunningham Square
Providence, RI 02918-0001
401-865-2578
http://www.providence.edu/archives
From: Encoded Archival
Description List [mailto:[log in to unmask]] On Behalf Of Michele R Combs
Sent: Friday, November 06, 2009 12:08 PM
To: [log in to unmask]
Subject: Re: Accented characters
Hi
Bob – you mean you can open a master document and have it resolve all the
subdocuments to display the complete text correctly, in FireFox?
How’d you get that to work? Would you be willing to share a sample
document?
Also,
do you mean Firefox doesn’t apply your stylesheets at all, or that it
errors on them? I use FF all the time and have had no problem getting it
to apply style sheets…
Michele
From: Encoded Archival
Description List [mailto:[log in to unmask]] On Behalf Of Robert Young Walser
Sent: Friday, November 06, 2009 11:58 AM
To: [log in to unmask]
Subject: Re: Accented characters
On Nov 6, 2009, at 10:42 AM, Ethan Gruber wrote:
Hi Bob,
Are you sure they validate, in general? Have you tried validation through
Saxon or an editor like oXygen? Can you open the document in Firefox?
One other note here: The documents display in Firefox, but
it doesn't apply stylesheets. IE does apply the stylesheets which are named in
the XML declaration for the master and each subdocument.
Bob