Ticket #1868: CodegenXML.tpl.patch
File CodegenXML.tpl.patch, 2.0 KB (added by janssen, 12 years ago) |
---|
-
Compiler/Template/CodegenXML.tpl
31 31 let guid = getUUIDStr() 32 32 << 33 33 <?xml version="1.0" encoding="UTF-8"?> 34 <OpenModelicaModelDescription >34 <OpenModelicaModelDescription 35 35 xmlns:exp="https://svn.jmodelica.org/trunk/XML/daeExpressions.xsd" 36 36 xmlns:equ="https://svn.jmodelica.org/trunk/XML/daeEquations.xsd" 37 37 xmlns:fun="https://svn.jmodelica.org/trunk/XML/daeFunctions.xsd" 38 38 xmlns:opt="https://svn.jmodelica.org/trunk/XML/daeOptimization.xsd" 39 39 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 40 40 <%modelDescriptionXml(simCode,guid)%> 41 > 41 42 42 43 <%vendorAnnotationsXml(simCode)%> 43 44 … … 255 256 case ICONST(__) then integer 256 257 case RCONST(__) then real 257 258 case SCONST(__) then '"<%Util.escapeModelicaStringToXmlString(string)%>"' 258 case BCONST(__) then 'if bool then "1" else "0"'259 case BCONST(__) then (if bool then "1" else "0") 259 260 case ENUM_LITERAL(__) then '<%index%>/*ENUM:<%dotPathXml(name)%>*/' 260 261 else "*ERROR* initial value of unknown type" 261 262 end initValXml; … … 2124 2125 case e as ICONST(__) then '<exp:IntegerLiteral><%integer%></exp:IntegerLiteral>' 2125 2126 case e as RCONST(__) then '<exp:RealLiteral><%real%></exp:RealLiteral>' 2126 2127 case e as SCONST(__) then '<exp:StringLiteral><%daeExpSconstXml(string, context, &preExp /*BUFC*/, &varDecls /*BUFD*/)%></exp:StringLiteral>' 2127 case e as BCONST(__) then '<exp:BooleanLiteral> <%if bool then "1" else "0"%> <exp:BooleanLiteral>'2128 case e as BCONST(__) then '<exp:BooleanLiteral>' + (if bool then "1" else "0") + '</exp:BooleanLiteral>' 2128 2129 case e as ENUM_LITERAL(__) then index 2129 2130 case e as CREF(__) then daeExpCrefRhsXml(e, context, &preExp /*BUFC*/, &varDecls /*BUFD*/) 2130 2131 case e as BINARY(__) then daeExpBinaryXml(e, context, &preExp /*BUFC*/, &varDecls /*BUFD*/)