faqts : Computers : Programming : Languages : Tse : Language : Computer : XML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 9 people (56%) answered Yes
Recently 5 of 9 people (56%) answered Yes

Entry

TSE: Language: Computer: Compile: XML: How to run XML from TSE?

Oct 4th, 2003 17:35
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 03 March 2002 - 09:27 pm ----------------------

TSE: Compile: XML: How to run XML from TSE?

Steps: Overview:

 1. make sure you have Microsoft Internet Explorer v5.5 or higher
    installed, (e.g. v5.0 will not work correct, you have to have a
    higher version).

    To install the latest version of Microsoft Internet Explorer:

     1. e.g. goto URL:

       http://www.microsoft.com/windows/ie/default.asp

     2. click on link 'Download now',

     3. download and run the file 'ie6setup.exe'

 2. create a batchfile

     'comXML.bat'

    containing this text (adapt it to your system)
    and store this batchfile e.g. in your TSE directory
    (e.g. save to c:\mytsedirectory\comXML.bat)

    c:\progra~1\intern~1\iexplore.exe %3

    @exit

 3. Adapt the TSE compiler information

    (in TSE, after loading any file, press <SHIFT><F9>
    then 'D' for debug compiler setup
    then <ALT><C> to copy one of the compiler settings present
    then change the fields:

    'Extension' to: .xml

    'Description' to: XML

    'Command' to: c:\mytsedirectory\comXML.bat &name& &ext& &fn& >
    &output&

    make sure this information is permanently stored in the compiler
    information (via <ENTER>, then <ESCAPE>)

 4. You will have to create 3 different text files
    (save all these 3 text files in the same directory on your 
harddisk):

    1. create and save the text file 'hellowor.xml'

    2. create and save the text file 'hellowor.dtd'

    3. create and save the text file 'hellowor.xsl'

    ---

    Where the first text file 'hellowor.xml' contains the following
    text:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MYBOOKS SYSTEM "hellowor.dtd">
    <?xml-stylesheet type="text/xsl" href="hellowor.xsl"?>
    <!-- library: (filenamemacro=hellowor.xml)  -->
    <MYTEXT>
      Hello world from XML!
    </MYTEXT>

    ---

    and where the second text file 'hellowor.dtd' contains the
    following text:

   <!ELEMENT MYTEXT (#PCDATA)>

    ---

    and where the third text file 'hellowor.xsl' contains the following
    text:

   <?xml version="1.0"?>

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

     <xsl:template match="/">
      <xsl:apply-templates/>
     </xsl:template>

     <xsl:template match="MYTEXT">
      <HTML>
       <HEAD>
        <TITLE>
          My text
        </TITLE>
       </HEAD>
       <BODY>
        <H3>
          Greeting
        </H3>
        <BR/>
        <BR/>
        <HR/>
        <HR/>
         <xsl:value-of select="."/>
        <HR/>
       </BODY>
      </HTML>
     </xsl:template>

    </xsl:stylesheet>

 5. If you now load this .XML file 'hellowor.xml'

    Then press <CTRL><F9> or <ESCAPE><M><C> to compile, this will run
    that batch file, which runs Microsoft Internet Explorer with your
    XML file as parameter.

    Which will show you the generated HTML page, showing

     'Hello world from XML!'

---
---

Internet: see also:

Computer: Wordprocessor: TSE: Language: Computer: Compile: Run: 
Overview
http://www.faqts.com/knowledge_base/view.phtml/aid/24311/fid/895

----------------------------------------------------------------------