Thanks, Hussein.  My problem (when pointing to files in other folders, 
the links worked OK locally, but actually got hardwired to the path of 
my PC) had nothing to do with using the wrong XXE elements or 
attributes, but rather the data files didn't reside in a subfolder of 
the converted HTML files.  XXE (or XML or HTML?) doesn't know that each 
end-user will have the same directory structure.  So, even though I 
specified my links by reference (e.g., ../../folderA/fileA), they 
somehow got hardwired to the path of my PC and weren't valid on the PCs 
of other users.  What I needed to do was to simply move or copy these 
files to a subfolder of the converted HTML files (or to the same folder 
as the HTML files).  Thanks, Hussein, for pointing out the simple solution.

-- Ken


Hussein Shafie wrote:

>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.
> 
>--
>XMLmind XML Editor Support List
>xmleditor-support at xmlmind.com
>http://www.xmlmind.com/mailman/listinfo/xmleditor-support
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050802/04daacaf/attachment.htm
 

Reply via email to