Print

Print


I figured that it was similar logic - automatically applying the
template for these elements adds the href and type regardless of whether
corresponding elements exist in the original XML.

Understanding why this happens (with your explanations!) has been good
for my understanding of EAD and XSLT.

Thanks again for taking the time to respond (and thanks to Mike for the
alternative stylesheet).

Katie

-----Original Message-----
From: Encoded Archival Description List [mailto:[log in to unmask]] On
Behalf Of Daniel Pitti
Sent: Friday, August 27, 2010 5:15 PM
To: [log in to unmask]
Subject: Re: dtd2schema.xsl and ref attributes for schema validation

I fear it is the same thing. No need for the xlink:type and xlink:href.
The conversion needs to be more sophisticated. I an easily eliminate
this for certain tags, but it would take a little longer to modify the
conversion to examine the context and then convert accordingly. Well,
maybe that long. The main test would be to simply see if the DTD version
has an @href. I hastily surmise.

On Aug 27, 2010, at 3:59 PM, Dunn, Kathryn M. wrote:

> Thank you very much, Daniel!
>
> I also had a title element with a similar issue:
>
> Before transformation:
> <title encodinganalog="740" source="local">Songs of Rensselaer.</
> title>
>
> After transformation:
> <title xlink:type="simple" encodinganalog="740" source="local"
> xlink:href="">Songs of Rensselaer.</title>
>
> Katie
>
> -----
> Katie Dunn
> Technology & Metadata Librarian
> Rensselaer Polytechnic Institute
> 518-276-8353
> [log in to unmask]
>
> -----Original Message-----
> From: Encoded Archival Description List [mailto:[log in to unmask]] 
> On Behalf Of Daniel Pitti
> Sent: Thursday, August 26, 2010 2:49 PM
> To: [log in to unmask]
> Subject: Re: dtd2schema.xsl and ref attributes for schema validation
>
> Good question Katie. I think the authors of the dtd2schema got it 
> wrong.
> I was one of the authors! <ref target="ref01"> is fine, I think, as it

> is an "internal" link. Though I should go back and review the W3C 
> XLINK specifications, as we made it possible to treat the <ref> either

> in the "old fashion way," that is @target of type IDREF; or using 
> XLink, and I do not recall, at the moment, the rationale.
>
> It is very likely that all of the EAD linking will be reviewed in the 
> next revision of EAD.
>
>
> On Aug 26, 2010, at 2:00 PM, Dunn, Kathryn M. wrote:
>
>> Hello!
>>
>> I'm new to EAD and am trying to understand the differences between 
>> documents that validate using the DTD and the XSD schema.
>>
>> I used dtd2schema.xsl (http://www.loc.gov/ead/dtd2schema.xsl) to 
>> transform a DTD-valid document into an XSD schema-valid document.  I 
>> have a question about one of the changes it made.
>>
>> Before transformation (original DTD-valid EAD):
>> <ref target="ref01">This</ref> is an internal link.
>>
>> After transformation using dtd2schema:
>> <ref xlink:type="simple" target="ref01" xlink:href="">This</ref> is 
>> an
>
>> internal link.
>>
>> Why are the xlink:type="simple" and xlink:href="" attributes added?
>> Schema validation doesn't fail if I remove them.  Are either of them 
>> necessary or desirable?  I understand why you'd see these if you had 
>> linktype and href attributes in your original EAD.
>>
>> Also, when would you use the href attribute on a ref element instead 
>> of a target attribute?
>>
>> Thanks very much for any help in advance!
>> Katie
>>
>> -----
>> Katie Dunn
>> Technology & Metadata Librarian
>> Rensselaer Polytechnic Institute
>> 518-276-8353
>> [log in to unmask]