Ken Doran wrote: > I'm authoring a Docbook modular document (with chapters) and am trying > to insert hyperlinks. I'm trying to link not to websites (URLs), but > rather to files residing on the end-user's PC. I've tried the steps for > creating hyperlinks that Hussein suggested to Karen, but without > success. I'm using V2.11 (Standard Edition). > > I created a "ulink" element as described by Hussein. However, "href" > does not appear in the list of attributes for ulink. So, I added href > as an attribute and assigned it a value (in my case, the name of a file > in my XXE folder).
You did that using a editor other than XXE (e.g. a text editor) because, in normal editing mode, XXE cannot be used to add alien attributes such as "href" to an element. > Once my Docbook document was converted to HTML, I > clicked on the link in the resulting HTML page, but it went nowhere. > So, I went back into XXE and noticed that my XML was invalid. The > following errors were cited: > > element has no attribute "href" [cvc-complex-type.3] > required attribute "url" is missing [cvc-complex-type.4] > > My understanding is that ulink elements are employed in Docbook to > create href's in HTML files. Further, that local files as well as URLs > may be referenced. What am I doing wrong? > > On the other hand, if I specify the "url" attribute instead of the href > attribute, I'm able to create good links to other documents (chapters), > but *only* if the HTML files for the referenced chapters reside within > the *same* folder. XXE is right. I was wrong. My answer to Karen contained a *blatant* error. The ulink element has no "href" attribute. Instead it has a required "url" attribute. You need to specify a proper value for this "url" attribute. See http://docbook.org/tdg/en/html/ulink.html > However, some of the files to be hyperlinked are data files (not > chapters) and must reside in different folders. The hyperlinks to these > files also work OK on my PC. Yet, even though I specify them by > reference (e.g., ../../folderA/fileA), these links somehow seem to get > hardwired to the path of my computer. So, the links created are not > valid on the PCs of any other users. Again, what am I doing wrong? I don't know what to answer. This problem is absolutely not related to XXE. It seems that you need to copy "../../folderA/fileA" along with the generated HTML file. This task could be automated using XXE but it would require a pretty advanced customization of the DocBook configuration.

