Question about DOM and XSL
Liang Zou
lltous at MSN.COM
Sun Feb 5 20:12:49 PST 2006
Greetings, everyone,
I'm trying to convert GML to SVG. I'm confused by DOM and XSLT processors.
By using the following codes, I can convert GML to SVG. So what is the
difference between DOM and XSL processors, like saxon and so on? Thank you
in advance.
<?php
// XML, XSLT and HTML files
$xmlFile = "C:\ms4w\apps\wfs_ser\airports.xml";
$xsltFile = "C:\ms4w\apps\wfs_ser\gml2svg.xslt";
$svglFile = "\ms4w\Apache\htdocs\example.svg";
$filename = "example.html";
$xsltParam = array( "date" => date( "F j, Y g:i a" ) );
// Create a DomDocument object from an xml file.
if( !$domXmlObj = domxml_open_file( $xmlFile ) ) {
die( "Cannot parse the xml file." );
}
// Create a DomDocument object from the xslt file.
$domXsltObj = domxml_xslt_stylesheet_file( $xsltFile );
// Create a DomDocument object from the xslt transformation
// of the xml and xslt file.
$domTranObj = $domXsltObj->process( $domXmlObj, $xsltParam );
// Create an svg file of the tranformation
$domXsltObj->result_dump_file( $domTranObj, $svgFile );
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the MapServer-users
mailing list