Hi Stephen,
The <style> task uses the .net System.Xml.Xsl classes to run the transform. This will produce slightly different results to what msxsl will generate. You could either :
1) use the <exec> task to call msxsl from your nant script

2) alter your xslt stylesheet to work with the System.Xml.Xsl processor. If you go this route you could find nxslt [1], a command line processor using the .net classes useful for testing.

hope this helps,

Ian

[1] http://www.tkachenko.com/blog/archives/000470.html

Boome, Stephan wrote:

Hi,

I written a xsl template to process a XMI model file, so that it produces
code from our design model, when developing I was using the msxsl processor
to run my xsl against my xml.

so it looked something like
msxsl codegenerator.xsl dataModel.xml -o database.sql

This all worked fine, now I want to place this step into my build process,
        <target name="generate" description="Creates the database sql file">
                <style style="codegenerator.xsl" in="dataModel.xml"
out="database.sql" />
        </target>

however when I run this task I get the following error, The root element name must match the DocType name. An error occurred at file
codegenerator.xsl, (10, 2).

Here is a snippet of the first couple of lines of the xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xslt [

        <!-- Used to control code intenting -->
        <!ENTITY IDENT "        ">
        <!ENTITY IDENT2 "&IDENT;&IDENT;">
]>
<xsl:stylesheet version="1.0" xmlns:UML="http://www.omg.org/UML";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; >
<xsl:output method="text" encoding="ISO-8859-1"/>
<xsl:strip-space elements="*" />

Can somebody please let me know what I need to do to make this work?

Thanks

Stephan Boome





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to