Hi,
i'd like to know how to avoid the xml declaration in the output file. seems that omit-xml-declaration="yes" doesn't work :
Code:
<xsl:stylesheet
xmlns:simulink=""
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
à à <xsl:output
method="text"
indent="no"
omit-xml-declaration="yes"
name="SIGNAL"/>
à à <xsl:strip-space elements="*" />
à à <xsl:template match="/">
<xsl:apply-templates />
à à </xsl:template>
à à <xsl:template match="simulink:Model|simulink:Library">
<xsl:variable name="model_name" select="concat(property[@name='Name']/@value,'.SIG')" />
<xsl:result-document href="{$model_name}" formalism="SIGNAL">
à à <xsl:apply-templates />
</xsl:result-document>
à à </xsl:template>
the declaration appears in the dest file.
another pb : when i put the code of simulink:Model or Library in the / element, seems like it doesn't see the elements 'property'. My source looks like this :
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<simulink:Model xmlns:simulink="">
à à <property name="Name" value="modele" />
à à <property name="Version" value="3.00" />
à à <property name="SimParamPage" value="Solver" />
à à <property name="SampleTimeColors" value="on" />
à à <property name="InvariantConstants" value="off" />
à à ....
why do i have to write a rule for simulink:Model in addition to the '/' rule ?
Thanks