XML is usefull for Stroring and give structure to data (generally text based)

Community : irc://irc.freenode.net/#xmlfr

RzR

Misc

DEMO

RSS News in XML http://rzr.online.fr/news.php

View any XML Source + XSL StyleShell in a XML browser

http://localhost/~rzr/scripts/xml.php ? xml=yourpage.xml & xsl=yourpage.xsl

http://www.w3.org/TR/xinclude/

Make HTML page or XML source code

Copy XML stream

http://localhost/~rzr/rzr.online.fr/w/scripts/xml.php?xsl=source.xsl&xml=copy.xsl

Example of pages generation by XSLT, PHP, and XML, using URL rewriting.

http://valdo.cineteck-fr.com/home.html

[[LibreSoftware]]

[[ClosedSource]] [[Software]]

  • xmlspy

http://www.xmlmind.net/foconverter/_download/xfc-22p1.tgz

ed2k:|file|xfc-22p1.tgz|7589235|a084fc4a65f51a03bf9f56769d361ab9| ed2k:|file|xfc-22.tgz|7587623|0fc3e337f12fc3beb499fc19920022a8|

Terminology

  • DTD : Document Type Definition
  • XSL is a language you can use for freely modify any source text (StyleSheet)
  • DOM : The Document Object Model specifies a tree-based representation for an XML document, as opposed to the event-driven processing provided by SAX. DOM is used to access XML compliant documents
  • SAX: The Simple API for XML

http://www.zvon.org/

XSL / XSLT

http://www.w3.org/TR/xslt

A simple stylesheet looks like this

<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<h1>
<xsl:value-of select="//title"/>
</h1>
<h2>
<xsl:value-of select="//author"/>
</h2>
</xsl:template>
</xsl:stylesheet>

Tool :

apt-get install xsltproc
xsltproc stylesheet.xsl data.xml >| readable.html

Problems: When using in text extendend ascii codes like accents ( é / e' ) etc

<?xml version="1.0" encoding="ISO-8859-15" >

Else use xml code like &#xE9; or UTF8 codes ( é / A~© ) Both will be escaped to UTF8 ( Unicode char are escaped in Emacs like \x{00E9} )

<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >

Is it possible to produce with xsltproc a html file on extendend (local) ascii charset instead of UTF8 ?

Tool:

apt-get install libxml2-utils
http://www.xmlsoft.org/encoding.html
#rzr@nrv:xml/$ cat sample.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
é (e' \351 )
&#xE9; ( #xE9; )
</document>
#rzr@nrv:xml/$ xmllint sample.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
é (e' \351 )
é ( #xE9; )
</document>

SXL saxon (untested) http://saxon.sourceforge.net/

apt-get install lib-saxon-java
CLASSPATH=saxon.jar:fop.jar:$CLASSPATH
export CLASSPATH
| com.icl.saxon.StyleSheet filename.xml docbook/fo/docbook.xsl > output.fo
| org.apache.fop.apps.CommandLine output.fo output.pdf
For example, the identity transformation can be written using xsl:copy as follows:
<xsl:template match="@*|node()">
<xsl:copy>
  <xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

RSS/RDF

RSS (Really Simple Syndication) is an XML-based format for distributing and aggregating Web content (such as news headlines).

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.0/">
<rdf:Description rdf:about="http://localhost/doc"
dc:creator="RzR"
dc:title="title"
dc:description="etc"
dc:date="2001-03-30" />
</rdf:RDF>

http://www.w3.org/RDF/

http://magpierss.sourceforge.net/

http://www-106.ibm.com/developerworks/xml/library/x-rss20/

http://www.wired.com/news/rss

http://news.yahoo.com/rss

http://dir.yahoo.com/Computers_and_Internet/Data_Formats/XML__eXtensible_Markup_Language_/RSS/

http://www.2rss.com/index.php

ON THE FLY SERVER SIDE CONVERTIONS

http://axkit.org/

Debian

axkit - An XML Application Server for Apache
axkit-examples - AxKit examples

http://axkit.org/wiki/view/AxKit/QuickStart

Cocoon : A XML/XSL publishing framework servlet This Apache module (or Extention) processes xml+xsl on the fly.

apt-get install cocoon-example jserv lib-dom-java libxerces-java
apt-get install cocoon2-example

http://127.0.0.1/Cocoon.xml (Dont work)

XMLRESUME

X3D

http://www.iol.ie/~goldens/david/x3d/linux/x3d-linux-tips.html
http://freewrl.sourceforge.net/
apt-get install freewrl
http://www.linux3dgraphicsprogramming.org

PHP + XML

DTD

http://www.sagehill.net/livedtd/

I want a tool to generate html forms to produce xml doc according to a given DTD

XML, GUI : XUL Glade etc

chrome://navigator/content/navigator.xul

http://nerv.hosmoz.net/images/shots/mozilla.jpg

[[XUL]]

http://www.mozilla.org/projects/xul/

http://www.playsophy.com/edom/demos/XML/xuleditor.xul

lynx -dump -head http://rzr.online.fr/index.xul | grep "Content-Type:"
Content-Type: application/vnd.mozilla.xul+xml

LIBS

  • DOM & SAX Api
  • * Java : jax
  • * Xerces (apache) , libxml2 , expat

Samples in Sun / Java / Tutorial / xml ..

comments

how to put ”–” into XML comments ? (ie while(i–){} ) ?

 echo '<!-- dash--dash -->' > /tmp/t.xml &&  xmllint  /tmp/t.xml
/tmp/t.xml:1: parser error : Comment not terminated 
<!-- dash
<!-- dash--dash -->
         ^
/tmp/t.xml:2: parser error : Start tag expected, '<' not found

echo ' <![CDATA[ dash--dash ]]>' > /tmp/t.xml &&  xmllint  /tmp/t.xml

cat<<EOF > /tmp/t.xml &&  xmllint  /tmp/t.xml && echo $? # =0
<test>
<![CDATA[ -- ]]>
</test>
EOF

Seems not possible out of tag :

MISC / FR

MISC

MORE

xml.txt · Last modified: 2015/11/01 20:20 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki