 |
|
|
|
|
| Added: Mon, Mar 21st 2005 04:12 UTC (3 years, 6 months ago) |
Updated: Mon, Mar 21st 2005 05:33 UTC (3 years, 6 months ago) |
|
|
About:
SAPIPROCESSOR is a compact toolkit for processing
documents with XML Sapiens. SAPIPROCESSOR takes
XML files with data, XML Sapiens scenarios, and
environment variables as input parameters.
SAPIPROCESSOR returns a parsed page or an XML tree
for further format processing. SAPIPROCESSOR
compiles a document from separated data, a
presentation template, and XML Sapiens scenarios.
SAPIPROCESSOR can be used a the core for a CMS.
Author:
Dmitry Sheiko <sheiko (at) cmsdevelopment (dot) com>
[contact developer]
Homepage:
http://sapiprocessor.sourceforge.net/
Tar/GZ:
http://prdownloads.sourceforge.net/[..]essor/sapiprocessor_v100.tar.gz?download
Zip:
http://prdownloads.sourceforge.net/[..]rocessor/sapiprocessor_v100.zip?download
Mailing list archive:
http://groups.yahoo.com/group/xmlsapiens/
Trove categories:
[change]
Dependencies:
[change]
No dependencies filed
|
|
» Rating:
(not rated)
» Vitality: 0.00% (Rank 25525)
» Popularity: 0.14% (Rank 29683)

(click to enlarge graphs)
Record hits: 1,550
URL hits: 432
Subscribers: 3
|
|
Branches
Comments
[»]
XML Sapiens and XSLT
by Dmitry Sheiko - Mar 21st 2005 04:23:43
Any web document can be logically divided into data and their presentation.
Besides, a web document as a rule contains elements of user interface
(navigation, forms for information input, ect.). In compliance with W3C
recommendations, document presentation ? in spite of its data ? is managed
by XSLT technology (http://www.w3.org/TR/xslt). Document's data are placed
in an XML file and changed according to XSLT template rules. With the help
of XSLT it is also possible to assign presentation for user interface
forms, but initial data of these forms in the XML file are necessary for
such a change.
XML Sapiens allows defining data source for each user interface form as
well as describing the forms' logics. XML Sapiens' processor will analyze
developer's instructions and will broaden the initial XML file with user
interface forms' data for the current environment state. Based on the data
received from the XML file, XSLT transformer will create the final form of
the document.
Thus XML Sapiens helps to separate abstract constituents of a web-site:
data, presentation and user interface.
Initial XML
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='template.xsl'?>
<?xml-sapi type='text/xml' href='interface.sapi'?>
<content xmlns:sapi="http://www.xmlsapiens.org/spec/sapi.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink">
<data1>data1</data1>
<data2>data2</data2>
<menu><sapi:apply name="ddc.menu.value"
/></menu>
<title><sapi:apply
name="qc.title.value"></title>
<publication><sapi:apply
name="qc.publication.value"></publication>
</content>
XML Sapiens file script interface.sapi
<?xml version="1.0" encoding="UTF-8"?>
<sapi version="1.0"
xmlns:sapi="http://www.xmlsapiens.org/spec/sapi.dtd">
<sapi:ddc name="menu">
<sapi:choose>
<sapi:when exp="TRUE">
<sapi:for-each select="get_tree()">
<sapi:choose>
<sapi:when exp="TRUE">
<sapi:code>
<row sapi:id="this.this.id.value"
sapi:activity="this.this.currentpage.value">
<link><sapi:apply
name="this.this.href.value" /></link>
<item><sapi:apply
name="this.this.title.value" /></item>
</row>
</sapi:code>
</sapi:when>
</sapi:choose>
</sapi:for-each>
</sapi:when>
</sapi:choose>
</sapi:ddc>
</sapi>
Final XML
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='template.xsl'?>
<content xmlns:sapi="http://www.xmlsapiens.org/spec/sapi.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink">
<data1>data1</data1>
<data2>data2</data2>
<menu>
<row id="01" activity="1">
<link>/intro/</link>
<item>Introduction</item>
</row>
<row id="02" activity="0">
<link>/chapter1/</link>
<item>Chapter 1</item>
</row>
<row id="03" activity="0">
<link>/chapter2/</link>
<item>Chapter 2</item>
</row>
</menu>
<title><![CDATA[Introduction]]></title>
<publication><![CDATA[<p>Content</p>]]></publication>
</content>
[reply]
[top]
|
|
 |