Re: State diagrame with code export



Hi David,

thanks for sharing the code. If you look e.g. at dia-uml2cpp.xsl, which is part
of the Dia distribution, you'll notice a number of differences
compared to your code
(I've removed comments):

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
        <xsl:output method="text"/>
        <xsl:param name="directory"/>
        <xsl:param name="indentation"><xsl:text>  </xsl:text></xsl:param>

        <xsl:template match="dia-uml">

In case the snippet you provided was incomplete, please provide the
complete file(s).
Some hints:

* Provide the xsl namespace.
* omit the "dia:" prefix

Did you try debugging using xsltproc?
Maybe the Visual xsltproc debugger can help you:

http://sourceforge.net/projects/visual-xsltproc/

Regards,

Steffen

 <xsl:template match="/">
    <xsl:element name="dia-uml">
      <xsl:apply-templates select="dia:object[ type='UML - State']"/>
    </xsl:element>
  </xsl:template>

  <xsl:template match="dia:object[ type='UML - State']">
    <xsl:element name="etat">
    </xsl:element>
  </xsl:template>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]