This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: <textdata/> --> use of URI's in fileref?


It is not incorrect to use a URI in the fileref attribute.  The example you
show here, though, is a Public ID (or Formal Public Identifier).  Typically
what you would do would be to declare an entity as follows in your local
subset:
<!ENTITY insert_this PUBLIC "-//DSPFACTORY//TEXT Example//EN"
"http://www.dspfactory.com/entities/example.txt";>

then write your textdata as <textdata entityref="insert_this"/>


In your case, you want to insert the DTD as text.  In that case, you're
stuck with either using a URI (e.g. the URL) in the fileref attribute, or
re-declaring the DTD files as an external unparsed entity:

<!NOTATION dtd SYSTEM "DTD.spec">
<!ENTITY dtd_as_text PUBLIC "-//DSPFACTORY//DTD DocBook XInclude Module
V1.0//EN" "http://www.dspfactory/entities/dspfactory.dtd"; NDATA dtd>

<textdata entityref="dtd_as_text"/>

I'm not sure that will work, but if I'm thinking correctly this morning, it
should.  You may also want to look at Selfdocbook
(http://cyberelk.net/tim/docbook/selfdocbookx/) and see how Tim Waugh did
what you are trying to do.

Jeff Beal

-----Original Message-----
From: Johann Richard [mailto:Johann.richard@dspfactory.ch]
Sent: Friday, November 08, 2002 7:13 AM
To: docbook-apps@lists.oasis-open.org
Subject: DOCBOOK-APPS: <textdata/> --> use of URI's in fileref?


Hi all,

Would it be "incorrect" -- in terms of the "DocBook content model" -- to use
URI's in the "fileref" attribute of <textdata/> ?

An example use case for this is the documentation of a DocBook
customization: I wanted to add the source code of the customization layer
into my output, and my first thought was, to specify the DTD's Public ID as
"fileref" in <textdata/> to _automagically_ include it in the output:

<programlisting>
  <textobject>
    <textdata fileref="-//DSPFACTORY//DTD DocBook XInclude Module
V1.0//EN"/>
  </textobject>
</programlisting>

However, the <insertfile/> extension element did not resolve this; and so I
asked myself if I was about to mis-use resolving in a place were it was not
right to use it [ it was a "fileref" and not a "href" ]
Any comments on this?

Note: 
I'm thinking about modifying the JAVA extension locally, using Norm's
Catalog Resolver -- or the Stylesheet processor's own Resolver --, but on
the other hand, it could be of general use, that URI's could be used in
<textdata /> ... 
 
Regards,
Johann

********************************************
Johann Richard
IC & DSP Design Engineer  
Dspfactory SA
Champs-Montants 12a 
2074 Marin-Epagnier
Switzerland

Tel: +41 32 755 7462 
Fax: +41 32 755 7401 
e-mail: mailto:johann.richard@dspfactory.ch

http://www.dspfactory.com
********************************************


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]