Hi Hussein,

Thank you for quick response!

Frankly, this is a legacy DocBook file I once created in NotePad and just 
opened in XXE. Is it the problem?

Thank you,
Alex
  ----- Original Message ----- 
  From: Hussein Shafie 
  To: Alex Masycheff 
  Cc: xmleditor-support at xmlmind.com 
  Sent: Monday, July 30, 2007 10:27 AM
  Subject: Re: [XXE] Referring to a File Stored in another Folder Causes Error


  Alex Masycheff wrote:
  > when using XInclude and referring to a file stored in
  > a folder other than the current one, the error message displays on
  > opening the file:
  >  
  > //book/chapter/xi:include: missing or invalid "href" attribute/
  > // 
  > This is how the XInclude looks in my file:
  >  
  > <?xml version="1.0"?>
  > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  > "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
  >  
  > <book>
  >   <title>Book Title</title>
  >  
  > <chapter>
  > *    <xi:include href="../general/intro.xml"
  > xmlns:xi="**http://www.w3.org/2001/XInclude**"; />*
  > </chapter>
  > </book>
  >  
  > However, if I put the destination file intro.xml into the same folder
  > where the book file is stored and therefore change the code to:
  >  
  > <?xml version="1.0"?>
  > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  > "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
  >  
  > <book>
  >   <title>Book Title</title>
  >  
  > <chapter>
  > *    <xi:include href="intro.xml"
  > xmlns:xi="**http://www.w3.org/2001/XInclude**"; />*
  > </chapter>
  > </book>
  >  
  > ... everything works correctly.
  >  
  > How can it be? Am I doing something wrong?

  I have no idea. Message 'missing or invalid "href" attribute' is
  displayed only when the "href" attribute is missing or empty and there
  is no "xpointer" attribute.

  There is absolutely no problem storing included items in a directory
  other than the one containing the master document. We do that all the
  time. See for example, the docbook-modular-book.xml demo found in
  XXE_install_dir/demo/.

  If you want me to help you more, please send me (hussein at xmlmind.com) a
  zip archive containing all the files that cause this problem.



  ---
  PS: I hope that you are not adding XIncludes to your documents using a
  text editor. If this is the case, please take the time to read this
  chapter of our tutorial:
  
http://www.xmlmind.com/xmleditor/_distrib/doc/user/tutorial_modular_document.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070730/e0b825b2/attachment.htm
 

Reply via email to