[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxuum::document_ft

Title:DOCUMENT T1.0
Notice:**New notesfile (DOCUMENT.NOTE) now available (see note 897)**
Moderator:CLOSET::ADLER
Created:Mon Feb 09 1987
Last Modified:Thu Oct 31 1991
Last Successful Update:Fri Jun 06 1997
Number of topics:897
Total number of notes:4397

763.0. "Conditionals and Profiles..." by CHGV04::PROCTOR (Jerry Proctor) Wed Aug 05 1987 16:09

	-< Conditionals driving me crazy >-

I have a question concerning the use of conditionals inside
chapters and profiles. I am compiling a book with several
chapters that have conditionals inside. I reference these
conditionalized chapters as elements inside a profile and set the
specific conditions in the profile itself. Here is the kicker. I
am trying to reference these conditionalized chapters more than
once inside the profile. Each new reference, sets a new condition
so that the text in the chapter is a little different. 

The profile that I am using looks something like this:

<PROFILE>
       <ELEMENT>(VPOS00_FRONT_MATTER.SDML)
       <ELEMENT>(VPOS01_INTRODUCTION.SDML)
       <ELEMENT>(VPOS02_MANAGEMENT_SUMMARY.SDML)
       <ELEMENT>(VPOS06_PREDELIVERY.SDML)
	<SET_CONDITION>(ANAL_COND)
		<ELEMENT>(VPOS07_00PART3.SDML)
		<ELEMENT>(VPOS07_00PART4.SDML)    
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)     
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)     
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)   
	<SET_CONDITION>(ANAL_COND\REMOVE)
	<SET_CONDITION>(OPT_COND)
		<ELEMENT>(VPOS07_00PART5.SDML)
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)
	<SET_CONDITION>(OPT_COND\REMOVE)
	<SET_CONDITION>(CAP_MGMT_COND)
		<ELEMENT>(VPOS07_00PART6.SDML)
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)
	<SET_CONDITION>(CAP_MGMT_COND\REMOVE)
       <ELEMENT>(VPOS10_00PART7.SDML)
       <ELEMENT>(VPOS10_PROGRESS_REPORTS.SDML)
       <ELEMENT>(VPOSA0_BACK_MATTER.SDML)
       <ELEMENT>(VPOSAA_SUGGESTED_READING.SDML)
<ENDPROFILE>

The purpose of what I am doing is so that I can maintain a single
set of chapters, 07 - 09, that get compiled into three slightly
different sets of chapters. 

I have been having problems several problems in trying to do
this. 

The main problem is that the chapters themselves are not getting
in the final book. The messages I get say something about
creating a 0 length file. There is also a problem with the
chapter symbols, since they are the same for the three separate
chapters. 

Anyway, does anyone know if what I would like to do is possible
and how to do it? It looks like I am trying to do something
that is possible but I am not doing it the right way.


	Thanks in advance,

		Jerry 


T.RTitleUserPersonal
Name
DateLines
763.1Questions.VAXUUM::CORMANThu Aug 06 1987 15:208
    Jerry:
    Can you specify the command line(s) that you use to process
    the different versions of your book?
    
    Also, have you included <condition> tags in the chapters, themselves?
    (I think you have to, but I'm no expert on this).
    
    -Barbara
763.2exitCHGV04::PROCTORJerry ProctorThu Aug 06 1987 16:4490
Barbara,

I am compiling a single book and I am not setting any conditions on
the command line. They are imbedded in the profile. The command line 
that I use is as follows:

$ DOCUMENT/SYM=VPOS_DEFINES.SDML VPOS_PRO SOFT.REF LN03
                     ^              ^       
                     |              |
               My symbol file    The profile itself

The profile that I am using looks something like this:

<PROFILE>
       <ELEMENT>(VPOS00_FRONT_MATTER.SDML)
       <ELEMENT>(VPOS01_INTRODUCTION.SDML)
       <ELEMENT>(VPOS02_MANAGEMENT_SUMMARY.SDML)
       <ELEMENT>(VPOS06_PREDELIVERY.SDML)
	<SET_CONDITION>(ANAL_COND)
		<ELEMENT>(VPOS07_00PART3.SDML)
		<ELEMENT>(VPOS07_00PART4.SDML)
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)
	<SET_CONDITION>(ANAL_COND\REMOVE)
	<SET_CONDITION>(OPT_COND)
		<ELEMENT>(VPOS07_00PART5.SDML)
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)
	<SET_CONDITION>(OPT_COND\REMOVE)
	<SET_CONDITION>(CAP_MGMT_COND)
		<ELEMENT>(VPOS07_00PART6.SDML)
		<ELEMENT>(VPOS07_INITIAL_VISIT.SDML)
		<ELEMENT>(VPOS08_RETURN_VISITS.SDML)
		<ELEMENT>(VPOS09_ANALYSIS_REPORT.SDML)
	<SET_CONDITION>(CAP_MGMT_COND\REMOVE)
       <ELEMENT>(VPOS10_00PART7.SDML)
       <ELEMENT>(VPOS10_PROGRESS_REPORTS.SDML)
       <ELEMENT>(VPOSA0_BACK_MATTER.SDML)
       <ELEMENT>(VPOSAA_SUGGESTED_READING.SDML)
<ENDPROFILE>

------------------------------------------------------------------
In chapters 07, 08 and 08 I inbed contitionals like the following:
------------------------------------------------------------------

<CHAPTER>(Initial Visit for 
<CONDITION>(ANAL_COND)<REFERENCE>(ANAL)<ENDCONDITION>
<CONDITION>(OPT_COND)<REFERENCE>(OPT)<ENDCONDITION>
<CONDITION>(CAP_MGMT_COND)<REFERENCE>(CAP_MGMT)<ENDCONDITION>
\Chapt_Initial_Visit)

<CONDITION>(ANAL_COND\OPT_COND)
<P>
If appropriate, point out to the customer that long-term tuning,
or pro-active tuning, is the preferred method of handling
performance in the VMS environment. Short-term tuning only
addresses the current state of the system. In theory, as changes
are made to the system, re-analysis should be performed. 
<ENDCONDITION>
 
------------------------------------------------------------------
				...and...
------------------------------------------------------------------

<EMPHASIS>(Estimated Effort:\BOLD)

<CP>
<CONDITION>(ANAL_COND)
3 hours 
<ENDCONDITION>
<CONDITION>(OPT_COND)
4 hours 
<ENDCONDITION>
<CONDITION>(CAP_MGMT_COND)
5 hours 
<ENDCONDITION>

------------------------------------------------------------------
I am still trying to get it to work with no success so I am wondering
if I am trying to do something that can not be done or is is just my lack
of DOCUMENT expertise?

	Thanks,

	Jerry 



763.3Maybe multiple conditions is the problem?COOKIE::JOHNSTONThu Aug 06 1987 17:147
Multiple conditions didn't work in BL8; should have been fixed for V1.0, 
but this might be your problem.  Try commenting out the multiple 
conditions; see if it works for single conditions.


Rose

763.4Still confused about conditionalsCHGV04::PROCTORJerry ProctorThu Aug 06 1987 20:0436
    >Multiple conditions didn't work in BL8; should have been fixed for V1.0, 
    >but this might be your problem.  Try commenting out the multiple 
    >conditions; see if it works for single conditions.

    The multiple conditions are working fine when I compile the chapters
    off individually. And I'm using the latest DOCUMENT V1.0.
    
    The problem is still when I go to compile the entire book, the multiple
    references in the profile of the same file does not work. Here is
    a simplified example:

        file_pro.sdml
             |
             V
<PROFILE>
    <ELEMENT>front_matter.sdml                file1.sdml
    <SETCONDITION>(COND1)                        |
    <ELEMENT>(file1.sdml)  <--                   v
    <ENDCONDITION>           |--  <CHAPTER>(
    <SETCONDITION>(COND2)    |    <CONDITION>(COND1)VAX/VMS<ENDCONDITION>
    <ELEMENT>(file1.sdml)  <--    <CONDITION>(COND2)RSX-11<ENDCONDITION>
    <ENDCONDITION>                Overview\CHAPT_OVERVIEW)
    <ELEMENT>(back_matter.sdml)   <P>This chapter is an overview of
<ENDPROFILE>                      <CONDITION>(COND1)VAX/VMS<ENDCONDITION>
                                  <CONDITION>(COND2)RSX-11<ENDCONDITION>.
    
	$ DOCUMENT FILE_PRO SOFT.REF LN03
    

        Is there any way to make this work or perform the same function?

    		Thanks for any help,
    		Jerry 

    
763.5it isn't quite so complicated.VAXUUM::KOHLBRENNERMon Aug 10 1987 14:4130
    Jerry,
    
    The profile that you show has only <SET_CONDITION> tags, and
    no <CONDITION>...<ENDCONDITION> tags.
    
    So your profile is actually including the four conditionalized
    files three separate times.  In effect, the tag translator is 
    seeing 12 files.  Each of these files has to be an element
    of the book, that is, it has to have a <chapter>(blah\symb)
    tag.  Each of the twelve elements has to have a different symbol,
    else DOCUMENT won't be able to tell the chapters apart.  But
    you have not conditionalized the symbol argument to the chapter
    tag, so when you pull in the same file three times, you are
    supplying the same chapter symbol three times.
    
    Judging from the example that you supplied of how the chapters
    themselves have been coded, I think you can simply remove all
    the <set_condition> tags from the profile, remove the <element>
    tags that reference the chapters for the second and third times,
    (so each element file is referenced only once).
    
    Then use the /CONDITION=xxx qualifier when you process the book.
    
    (The /CONDIITON qualifier is misleading in its name.  Think of it
    as /SET_CONDITION, since that is what it does.)
    
    bill
    
    That's might OK in itself, provided the <CONDITION> ... <ENDCONDITION>
    tags made the intervening
763.6tch, sloppy editingVAXUUM::KOHLBRENNERMon Aug 10 1987 14:432
    Please ignore the last two lines of garbage in the preceding reply.