<?xml version="1.0" encoding="UTF-8"?>
<!--
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    $Id: manual.xml 50 2007-04-22 22:25:46Z jacekrad $
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Purpose: UTF-X documentation manual.
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    $HeadURL: https://utfx-doc.svn.sourceforge.net/svnroot/utfx-doc/utfx-doc-core/trunk/doc/manual.xml $
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    
    Copyright(C) 2004-2006 UTF-X Development Team.
    
    You may redistribute and/or modify this file under the terms of the
    GNU General Public License v2.
    
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<u:document xmlns:u="http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd ../xsd/utfxdoc.xsd">
  <u:title>UTF-X Doc</u:title>
  <u:subtitle>Unit Testing Framework - XSLT Documentation System</u:subtitle>
  <u:author>Jacek Radajewski</u:author>
  <u:version>0.1.0</u:version>
  <u:date>April 2007</u:date>
  <u:namespace-context>
    <u:namespace prefix-color="#BBA122">
      <u:prefix>u</u:prefix>
      <u:uri>http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd</u:uri>
    </u:namespace>
    <u:namespace prefix-color="#BBA122">
      <u:prefix>xsd</u:prefix>
      <u:uri>http://www.w3.org/2001/XMLSchema</u:uri>
    </u:namespace>
    <u:namespace prefix-color="#558826">
      <u:prefix>xsi</u:prefix>
      <u:uri>http://www.w3.org/1999/XMLSchema-instance</u:uri>
    </u:namespace>
    <u:namespace prefix-color="#5F2197">
      <u:prefix>wsdl</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/wsdl/</u:uri>
    </u:namespace>
    <u:namespace prefix-color="#129C62">
      <u:prefix>soap</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/wsdl/soap/</u:uri>
    </u:namespace>
    <u:namespace prefix-color="#ACDC00">
      <u:prefix>soap-env</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/soap/envelope/</u:uri>
    </u:namespace>
  </u:namespace-context>
  
  <u:sect1 id="introduction">
    <u:title>Introduction</u:title>
    <u:para>XML source available <u:link url="manual.xml">here</u:link></u:para>
    <u:sect2 id="what-is-utfx">

      <u:title>Wat is UTF-X?</u:title>
      <u:para> UTF-X is an extension to the JUnit Java unit testing framework and provides
        functionality for unit testing XSLT stylesheets. UTF-X strongly supports the <u:link
          url="http://xprogramming.com/xpmag/testFirstGuidelines.htm">test-first-design</u:link>
        principle with test rendition and test validation features allowing you to visually design
        your test before you start working on the on stylesheet. UTF-X was originally built to test
        XSLT stylesheet used in an XML publishing system so it has good support for DTD validation,
        XHTML and XSL:FO stylesheets. </u:para>
    </u:sect2>

    <u:sect2 id="whatisutf-xdoc">
      <u:title>What is UTF-X Doc?</u:title>
      <u:para>UTF-X Doc is a simple application for documenting XML systems and apps. UTF-X Doc
        documents are authored in XML and then rendered into desired formats such as HTML or PDF.
        UTF-X Doc was originally written to demonstrate how UTF-X tests are applied to real XML
        applications and to document the UTF-X system itself. This document for example has been
        created using UTF-X Doc.</u:para>
    </u:sect2>
  </u:sect1>

  <u:sect1 id="formattingxml">
    <u:title>Formatting XML</u:title>
    <u:para>UTF-X Doc allows you format XML fragments like this:</u:para>
    <u:figure>
      <u:xml highlight-xpath=".//u:xml" xml:space="preserve">
<u:sect1 id="formattingxml1">
    <u:title>Formatting XML</u:title>
    <u:para>UTF-X Doc allows you format XML fragments like this:</u:para>
    <u:figure>
        <u:xml>
            <more>
                <xml/>
            </more>
        </u:xml>
        <u:caption>XML Fragment</u:caption>
    </u:figure>
</u:sect1>
            </u:xml>
      <u:caption>XML Fragment</u:caption>
    </u:figure>
  </u:sect1>

  <u:sect1 id="wsdl">
    <u:title>WSDL Example</u:title>
    <u:para>The following example is a WSDL document with <u:code>wsdl:binding</u:code> highlighted
      by XPath <u:code>.//wsdl:binding</u:code>. Each prefix is highlighted in it's own colour.</u:para>
    <u:xml highlight-xpath=".//wsdl:binding" xml:space="preserve">
  <wsdl:definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd1="http://example.com/stockquote.xsd">
    <wsdl:types>
      <xsd:schema targetNamespace="http://example.com/stockquote.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:element name="TradePriceRequest">
          <xsd:complexType>
            <xsd:all>
              <xsd:element name="tickerSymbol" type="xsd:string"/>
            </xsd:all>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="TradePriceResponse">
          <xsd:complexType>
            <xsd:choice>
              <xsd:element name="price" type="xsd:float"/>
              <xsd:element name="invalidTickerSymbol" type="xsd:string"/>
            </xsd:choice>
          </xsd:complexType>
        </xsd:element>
      </xsd:schema>
    </wsdl:types>
    <wsdl:message name="GetLastTradePriceInput">
      <wsdl:part element="xsd1:TradePriceRequest" name="body"/>
    </wsdl:message>
    <wsdl:message name="GetLastTradePriceOutput">
      <wsdl:part element="xsd1:TradePriceResponse" name="body"/>
    </wsdl:message>
    <wsdl:portType name="StockQuotePortType">
      <wsdl:operation name="GetLastTradePrice">
        <wsdl:input message="tns:GetLastTradePriceInput"/>
        <wsdl:output message="tns:GetLastTradePriceOutput"/>
      </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="GetLastTradePrice">
        <soap:operation soapAction="http://example.com/GetLastTradePrice"/>
        <wsdl:input>
          <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output>
          <soap:body use="literal"/>
        </wsdl:output>
      </wsdl:operation>
    </wsdl:binding>
  </wsdl:definitions>  
</u:xml>
  </u:sect1>

  <u:sect1 id="struucture">
    <u:title>UTF-X Document Structure</u:title>
    <u:sect2>
      <u:title>Document metadata</u:title>
      <u:figure>
        <u:xml xml:space="preserve">
<u:document xmlns:u="http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd">
  <u:title>UTF-X Doc</u:title>
  <u:subtitle>Unit Testing Framework - XSLT Documentation System</u:subtitle>
  <u:author>Jacek Radajewski</u:author>
  <u:version>1.0.0</u:version>
  <u:date>February 2006</u:date>
</u:document>
                    </u:xml>
        <u:caption>Document metadata</u:caption>
      </u:figure>
    </u:sect2>
    <u:sect2>
      <u:title>Namespace context</u:title>
      <u:para>In order for all the funky features (e.g. element highliting) to work you will need to
        define a namespace context which bind prefixes to corresponding namespace URIs.</u:para>
      <u:figure id="namespace-context">
        <u:xml highlight-xpath=".//u:namespace[2]" xml:space="preserve">
  <u:namespace-context>
    <u:namespace>
      <u:prefix>u</u:prefix>
      <u:uri>http://utf-x.sourceforge.net/xsd/utfxdoc_1_0/utfxdoc.xsd</u:uri>
    </u:namespace>
    <u:namespace>
      <u:prefix>xsd</u:prefix>
      <u:uri>http://www.w3.org/2001/XMLSchema</u:uri>
    </u:namespace>
    <u:namespace>
      <u:prefix>xsi</u:prefix>
      <u:uri>http://www.w3.org/1999/XMLSchema-instance</u:uri>
    </u:namespace>
    <u:namespace>
      <u:prefix>wsdl</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/wsdl/</u:uri>
    </u:namespace>
    <u:namespace>
      <u:prefix>soap</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/wsdl/soap/</u:uri>
    </u:namespace>
    <u:namespace>
      <u:prefix>soap-env</u:prefix>
      <u:uri>http://schemas.xmlsoap.org/soap/envelope/</u:uri>
    </u:namespace>      
  </u:namespace-context>
</u:xml>
        <u:caption>Defining namespace context. Highlighted is the W3C Schema namespace to prefix
          binding.</u:caption>
      </u:figure>
    </u:sect2>
    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
    <!-- nested sections -->
    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
    <u:sect2>
      <u:title>Nested Sections</u:title>
      <u:figure>
        <u:xml xml:space="preserve">
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!-- nested sections -->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->          
<u:sect1 id="s1">
    <u:title>Level 1</u:title>
    <u:para>Paragraph in level 1 section</u:para>
    <u:sect2 id="s2">
        <u:title>Level 2</u:title>
        <u:para>Some more content in level 2 section.</u:para>
        <u:sect3 id="s3">
            <u:title>Level 3</u:title>
            <u:para>And the last, level 3 paragraph.</u:para>
        </u:sect3>
    </u:sect2>
</u:sect1>
                </u:xml>
        <u:caption>Three levels of nesting available</u:caption>
      </u:figure>
    </u:sect2>

    <u:sect2 id="blockelements">
      <u:title>Block Elements</u:title>
      <u:figure>
        <u:xml xml:space="preserve">
<xsd:group name="block">
    <xsd:sequence>
        <xsd:choice maxOccurs="unbounded" minOccurs="0">
            <xsd:element ref="u:para"/>
            <xsd:element ref="u:note"/>
            <xsd:element ref="u:figure"/>
            <xsd:element ref="u:pre"/>
            <xsd:element ref="u:xml"/>
            <xsd:element ref="u:ordered_list"/>
            <xsd:element ref="u:unordered_list"/>
        </xsd:choice>
    </xsd:sequence>
</xsd:group>
                </u:xml>
        <u:caption>Block elements</u:caption>
      </u:figure>
    </u:sect2>
  </u:sect1>
</u:document>
