xsl-list
[Top] [All Lists]

Re: [xsl] Adding entity declarations to DOCTYPE in xml output

2019-02-26 12:27:52
Yeah, I was afraid that was the only way to do it :P  Thanks --

Michele

-----Original Message-----
From: Michael Kay mike(_at_)saxonica(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 
Sent: Monday, February 25, 2019 4:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Adding entity declarations to DOCTYPE in xml output

If you're able to use Saxon, consider using the saxon:doctype extension 
instruction.

It can't be done with any version of standard XSLT, except by generating the 
DTD "by hand" using disable-output-escaping.

Michael Kay
Saxonica

On 25 Feb 2019, at 21:15, Michele R Combs mrrothen(_at_)syr(_dot_)edu 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Hello collective wisdom -

I would like to have several entity declarations in my output XML.  Here's 
what I currently have in my XSL:

<xsl:output
  method="xml"
  indent="yes"
  encoding="utf-8"
  exclude-result-prefixes="ns"
  omit-xml-declaration="yes"
  doctype-system="../ead_dtd/ead.dtd"
  doctype-public="+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival 
Description (EAD) Version 2002)//EN"/>


The output XML looks like this:

<!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded 
Archival Description (EAD) Version 2002)//EN" "../ead_dtd/ead.dtd">


I would like it to look like this:

<!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded 
Archival Description (EAD) Version 2002)//EN" "../ead_dtd/ead.dtd" [ 
<!ENTITY sua_name SYSTEM "sua_name.txt"> <!ENTITY sua_address SYSTEM 
"sua_address.txt"> <!ENTITY subjindex SYSTEM "sua_index.txt"> <!ENTITY 
summitref SYSTEM "summit_ref.txt"> ]>


Is this doable with XSL 1.1?

Thanks --

Michele
+++++++++
Michele Combs | Lead Archivist
Special Collections Research Center
Syracuse University Libraries
222 Waverly Ave
Syracuse, New York 13244
t 315.443-2081 | e 
mrrothen(_at_)syr(_dot_)edu<mailto:mrrothen(_at_)syr(_dot_)edu> | w 
scrc.syr.edu SYRACUSE UNIVERSITY syr.edu <winmail.dat>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>