Re: [xsl] Processing on both a document list and referenced documents

Subject: Re: [xsl] Processing on both a document list and referenced documents
From: "Mark Peters" <flickrmeister@xxxxxxxxx>
Date: Tue, 11 Mar 2008 21:00:56 -0400
Hi Brad,

I appreciate your efforts. I've studied the stylesheet you wrote, but
haven't been able to parse it mentally. When I apply it against my
sample files, the HTML body element is empty. I've tried passing the
documents to the stylesheet as variables, but without success.

The HDLG tool (http://hdlg.sourceforge.net/) produced an XML file
containing the directory structure of my XML files. The file is named
files2.xml in my original email. As you noticed the files referenced
by files2.xml are DITA XML files containing nested topic elements.

What I'm trying to do is produce an HTML listing of the folders and
files in files2.xml, but with the topic titles from the referenced
files appearing as sub-bulleted lists below each folder/file.

For example:

<html>
  <body>
     <ul>

        <!-- The following information comes from files2.xml -->

        <li xmlns:hdlg="http://www.hdlg.info/XML/filesystem";>file:/C:/folder1/>
        <li xmlns:hdlg="http://www.hdlg.info/XML/filesystem";>file:/C:/folder2>
           <ul>
              <!-- The following information comes from the referenced
DITA files -->
              <li>topicA
                 <ul>
                    <li>topicB</li>
                    <li>topicC</li>
                 </ul>
              </li>
           </ul>
           <ul>
              ..
           </ul>
        <!-- The following information comes from files2.xml -->
        <li xmlns:hdlg="http://www.hdlg.info/XML/filesystem";>file:/C:/folder3>
        ..
     </ul>
   </body>
</html>


My current XSL transformation (provided in the original email) pulls
each folder name from files2.xml using a for-each statement. When I
try to retrieve the topic/title values for the files in each specific
folder, the transformation instead retrieves the topic/title values
for *all* of the files referenced in files2.xml.

Thanks again,
Mark


On Tue, Mar 11, 2008 at 6:00 PM, Bjorndahl, Brad
<brad.bjorndahl@xxxxxxxxxxxxxxxx> wrote:
> Mark,
>
>  I'm still not sure I get all your requirements, but look at this to see if it handles the files the way you want.
>  >
>  Hoping this helps or at least gives you more options,
>  Brad
>
>




-- 

Mark Peters
Senior Technical Writer
Saba Software

Current Thread