REM  <?DocuGenCtrl-www.vishia.de version="1.2" encoding="ISO-8859-1" ?>
@echo off
REM Change between locally href and www-href by means of setting of the environment.
set HREF_ROOT_VISHIA=../../../../../..
::set HREF_ROOT_VISHIA=http://www.vishia.org

REM set the tmp directory outside and parallel to the ZBNF directory to prevent additional content in ZBNF/.
::set TMP_ZBNFJAX=D:\tmp_docugen
set TMP_ZBNFJAX=..\..\..\..\tmp_docugen

REM The setZBNFJAX_HOME.bat should be installed in a user's PATH and adapted. SAXON-xslt, Jdom and a JAVA-JRE are necessary!
call setZBNFJAX_HOME.bat
::pause

::del ..\..\..\..\docu\StateMGen_en.html
::del ..\..\..\..\tmp_docugen\StateJava_en.pre.xml
::del ..\..\..\..\tmp_docugen\StateJava_en.pre.xml


call %ZBNFJAX_HOME%\batch\cmdDocuGctr.bat _genDocu_docu.bat
copy %ZBNFJAX_HOME%\XmlDocu_xsl\htmlstd.css ..\..\..\..\docu\*.*

exit /B

// This control file contains the Hyperlinks so, that a user-local saved file is able to use.
DocuGenCtrl_RULES:

//This file should be known in the XML-image, therefore it should be given here:
genCtrl: _genDocu_docu.bat;

//The hyperlink references may contained in an extra file. It is given here (typical in an other path):
hrefCtrl: ./href_en.href;


//All xsl-Files which are necessary for conversion, should be named here:
importXsl
( XmlDocu_xsl:TopicXhtml.xsl
);


target: ../../../../docu/zbnfjax/*.*.html := file2Html
( srcpath="../../../zbnfjax"
, linux_startscript_template/jzcmd
);


target: ../../../../docu/zbnfjax/batch_template/*.*.html := file2Html
( srcpath="../../../zbnfjax/batch_template"
, jzcmd.bat
, readme.txt
);



target: ../../../../docu/zbnfjax/xsl/*.*.html := file2Html
( srcpath="../../../zbnfjax/xsl"
, Cheader2ByteDataAccess_Java.xslp
, Cheader2Xmi.xslp
, CheaderTypes.xsl
, Java2xmiTypes.xsl
, Java2xmi.xslp
//TODO, ZmakeGenctrl.zbnf
, ZmakeStd2Ant.genctrl
, ZmakeStd.xslp
, ZmakeStd.zbnf
);



target: ../../../../docu/zbnfjax/zmake/*.*.html := file2Html
( srcpath="../../../zbnfjax/zmake"
, ZmakeStd.zbnf
, States.genC1.jzgen
, States.genH1.jzgen
, States.genDocu.jzgen
, States.genHtml.jzgen
//TODO, Java2XMI.zmake
//TODO, Cheader2XMI.zmake
);

target: ../../../../docu/zbnfjax/zbnf/*.*.html := file2Html
( srcpath="../../../zbnfjax/zbnf"
, StateMachine.zbnf
, StateMCpp.zbnf
, StateMJava.zbnf
, StateMtxt.zbnf
, Java2C.zbnf
, Cheader.zbnf
, sclStruct.zbnf
, sclVarCfg.zbnf
);


target: ../../../../docu/*.*.html := file2Html
( ../../..:examples_Zmake/StateMGen/src/ExampleSimple.state.cpp
, ../../..:examples_Zmake/StateMGen/result/exampleSimpleStates.c
, ../../..:examples_Zmake/StateMGen/result/exampleSimpleStates.h

);

target: ../../../../docu/examples_ZBNF_core/*.*.html := file2Html
( srcpath="../../../examples_ZBNF_core"
, BillOfMaterial/billOfMaterial.txt
, BillOfMaterial/result.reference/billOfMaterial.xml
, BillOfMaterial/result.reference/billOfMaterial.csv
, BillOfMaterial/billOfMaterial2Java.bat
, BillOfMaterial/billOfMaterial.zbnf
, BillOfMaterial/billOfMaterial2csv.bat
, BillOfMaterial/billOfMaterial2xml.bat
, BillOfMaterial/billOfMaterial2csv.jzcmd
);


target: ../../../../docu/examples_JZcmd/*.*.html := file2Html
( srcpath="../../../examples_JZcmd"
, TestAll/testAll.jz.bat
, TestAll/testAll.jz.output.txt
, zmake-compile/exampleCcompile.jz.bat
, zmake-compile/zmakeMsc6.jzcmd
);


//All pre-conversion of inputs to an appropriate XML-format should be named before Document-entries.
//Here only some text topics are converted via Zbnf2Xml:
target: ../../../../tmp_docugen/*.*.xml := TextTopic2Xml
( Zbnf.syntax_en.topic
, Zbnf2Xml.topic
, Zbnf2Text.topic
, ZbnfJava.topic
, ZbnfJavaOutput.topic
, JZcmd.topic
, JZcmdInteract.topic
, JZcmdSyntax.topic
, ZmakeGen.topic
, CheckDeps_C.topic
, ZbnfSyntaxBinary.en.topic
, StateM.en.topic
, StateMGen.en.topic

, ../docuSrc_readme:readme_ZBNF.topic
);


target: :Wildcard:  ../../../../tmp_docugen/*.*.xml := TextTopic2Xml(../../../srcJava_vishiaBase/org/vishia/util:FileSelectWildcard.topic);



//The Document-entry describes the structure of the document.
Document "ZBNF-Download content" ident=ZBNF
html="../../../../docu/readme_ZBNF.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/readme_ZBNF.topic.xml;
  topictree(readme_ZBNF/*);
}

Document "State machine technology in C, C++ and Java" ident=StateEventProg
html=../../../../docu/StateEventProg.html
{
  input: ../../../../tmp_docugen/StateM.en.topic.xml;
	topictree(stateM_en/*);
	crossRef(Lit);

}  



Document "State machine technology, Generator for C and C++" ident=StateMGen_en
html=../../../../docu/StateMGen_en.html
{
  input: ../../../../tmp_docugen/StateM.en.topic.xml;
  input: ../../../../tmp_docugen/StateMGen.en.topic.xml;
	topic(stateM_en/*);              //only the substantiation, first chapter
  topictree(stateM_en/stmC/*);   //the whole chapter
	topictree(StateMGen_en/*);     //the articel contains the specials.
	crossRef(Lit);

}  





Document "JZcmd" ident=JZcmd
html="../../../../docu/JZcmd.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/JZcmd.topic.xml;
  input: ../../../../tmp_docugen/JZcmdSyntax.topic.xml;

  topictree(JZcmd/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}


Document "JZcmd-interact" ident=JZcmd_interact
html="../../../../docu/JZcmd-interact.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/JZcmdInteract.topic.xml;
  input: ../../../../tmp_docugen/JZcmd.topic.xml;

  topictree(JZcmd/interact/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}



Document "Zbnf2Text" ident=Zbnf2Text
html="../../../../docu/Zbnf2Text.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/Zbnf2Text.topic.xml;

  topictree(ZText/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}





//The Document-entry describes the structure of the document.
Document "Zmake Generation" ident=Zmake
html="../../../../docu/Zmake.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/ZmakeGen.topic.xml;
  input: ../../../../tmp_docugen/FileSelectWildcard.topic.xml;

  inset Wildcardpath = topic(Jutil/FileSystem/FileSelectWildcard)
  
  topictree(ZmakeGen/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}



//The Document-entry describes the structure of the document.
Document "Zmake - Checker Dependencies" ident=CheckDeps_C
html="../../../../docu/CheckDeps_C.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/CheckDeps_C.topic.xml;

  topictree(CheckDeps_C/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}



//The Document-entry describes the structure of the document.
Document "ZBNF-Main Description" ident=ZbnfMain_en
html="../../../../docu/sfZbnfMain_en.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/Zbnf.syntax_en.topic.xml;

  topictree(ZBNF_syntaxDescription/*);
  HyperlinkAssociation
  { thisDownload:_* = "*"; //Note: without path, same directory, but the path will be adjusted with the position of the html document.
  }
}


Document "ZBNF2XML: Converting texts with ZBNF to XML" ident=Zbnf2Xml
html="../../../../docu/Zbnf2Xml.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/Zbnf2Xml.topic.xml;

  topictree(ZBNF2Xml/*);
}



Document "ZBNF invoked in Java" ident=ZbnfJava
html="../../../../docu/ZbnfJava.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/ZbnfJava.topic.xml;
  input: ../../../../tmp_docugen/ZbnfJavaOutput.topic.xml;

  topictree(ZbnfJava/*);

}


//The Document-entry describes the structure of the document.
Document "ZBNF-Binary" ident=ZbnfBinary_en
html="../../../../docu/ZbnfBinary_en.html" css="htmlstd.css"
{
  input: ../../../../tmp_docugen/ZbnfSyntaxBinary.en.topic.xml;

  topictree(ZBNF_syntaxBin/*);
}





HyperlinkAssociation //Note: if refers from the source file
{ Topic:.ZbnfJavaOutput.* = "../../../../docu/ZbnfJava.html#Topic:.ZbnfJavaOutput.*"; //This topics are found there in locally files.
  Topic:.ZbnfJava.* = "../../../../docu/ZbnfJava.html#Topic:.ZbnfJava.*"; //This topics are found there in locally files.
  Topic:.ZBNF2Xml.* = "../../../../docu/Zbnf2Xml.html#Topic:.ZBNF2Xml.*"; //This topics are found there in locally files.
  Topic:.readme_ZBNF.* = "../../../readme_Zbnf.html#Topic.readme_ZBNF.*";
  Topic:.stateM_en.* = "../../../../docu/StateEventProg.html#Topic.stateM_en.*";
  Topic:.JZcmd.interact.* = "../../../../docu/JZcmd-interact.html#Topic:.JZcmd.interact.*"; //This topics are found there in locally files.
  ZBNFdocu:* = "../../../../docu/*";
  ZBNFroot:* = "../../../*";
  zbnfjax:* = "../../../../docu/zbnfjax/*.html";  //Generated html appearance of zbnfjax files.
  Zbnf2Text = "../../../../docu/Zbnf2Text.html";  
  examples_ZBNF_core:* = "../../../../docu/examples_ZBNF_core/*";
  examples_JZcmd:* = "../docu/examples_JZcmd/*";
  examples_Fileset = "../../../../docu/examples_JZcmd/FileSet/readme.html";
  ZBNF/examples_Zmake/* = "../../../../ZBNF/examples_Zmake/*";
  readme:* = "../../../*.html";
  examples_Zmake-readme:* = "../../../../ZBNF/examples_Zmake/*/readme.html";
  ZText = "../../../../docu/Zbnf2Text.html";  
  StateM = "StateEventProg.html";
  StateMGen = "StateMGen_en.html";
  Jstm = "#Jstm":Lit;
  omg-uml = "#omg-uml":Lit;
}





