Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

missing close tag in Compiler/Backend/DumpXML.mo

missing close tag in Compiler/Backend/DumpXML.mo

I noticed that the code to handle MathML tags is missing the emit of a close tag.  Here's a patch.

Bill

Code:


Index: Compiler/BackEnd/XMLDump.mo
===================================================================
--- Compiler/BackEnd/XMLDump.mo    (revision 11031)
+++ Compiler/BackEnd/XMLDump.mo    (working copy)
@@ -1700,6 +1700,7 @@
         dumpStrOpenTag(MathMLElseBranch);
         dumpExp2(fb);
         dumpStrCloseTag(MathMLElseBranch);
+        dumpStrCloseTag(MathMLIfClause);
         dumpStrCloseTag(MathMLApply);
       then ();
     case (DAE.CALL(path = Absyn.IDENT(name = "der"),expLst = args))

Edited by: janssen - Feb-06-12 21:24:29

Re: missing close tag in Compiler/Backend/DumpXML.mo

Thank you for the patch, I have applied it to our trunk in revision 11042.

Re: missing close tag in Compiler/Backend/DumpXML.mo

All the opening XML tags in the _init.xml files are missing their closing bracket, too, like the "ScalarVariable" tag in this snippet:

  <ScalarVariable
    name = "pendel2.x0"
    valueReference = "1026"
    description = "x-Position des Lagers in m"
    ...
  </ScalarVariable>

Latest Release version, 1.8.1

That's not supposed to be missing, is it? Same cause as the issue mentioned in the initial post?

Re: missing close tag in Compiler/Backend/DumpXML.mo

I don't have any missing end tags for elements in _init.xml. Everything is properly closed.
How do you get this? Do you have a model?

Code:


<ScalarVariable
    name = "y"
    valueReference = "1000"
    variability = "continuous" isDiscrete = "false"
    causality = "internal"
    alias = "noAlias"
    classIndex = "0" classType = "rSta"
    fileName = "ArrayEqn.mo" startLine = "16" startColumn = "3" endLine = "16" endColumn = "23" fileWritable = "true">
    <Real start="1.0" fixed="true"  />
  </ScalarVariable>

Cheers,
Adrian Pop/

Re: missing close tag in Compiler/Backend/DumpXML.mo

Hi Adrpo,

But the code you posted has the same thing. Isn't the "Scalarvariable" opening tag supposed to have < in front and > at the end? Or am I wrong about what XML is supposed to look like?

As in:

Code:


<ScalarVariable>
    name = "y"
    ...

Re: missing close tag in Compiler/Backend/DumpXML.mo

No, name, etc are attributes of the tag.

Code:

<tagName attr=value>

</tagName>

Re: missing close tag in Compiler/Backend/DumpXML.mo

Hi,

But it does, after all the attributes, before = "true" >.

Cheers,
Adrian Pop/

Re: missing close tag in Compiler/Backend/DumpXML.mo

Oops! Now I see it too.

My text editor highlighted everything that came after "<ScalarVariable" with red and I did not notice the closing >. so I thought there was something wrong with the XML.

Sorry!

Re: missing close tag in Compiler/Backend/DumpXML.mo

Yeah, you really need to look at it with an XML editor, not a text editor.

Re: missing close tag in Compiler/Backend/DumpXML.mo

I just checked on Wikipedia for free XML editors, and "CAM editor" as well as "Serna XML" came up high on their lists.

Can you recommend either one, or another freely available XML editor?

Re: missing close tag in Compiler/Backend/DumpXML.mo

Either Firefox or Google Chrome works pretty well as an XML inspector.  They'll show you the tree and let you poke around in it.

Re: missing close tag in Compiler/Backend/DumpXML.mo

I actually use nXML mode in GNU Emacs.

There are 0 guests and 0 other users also viewing this topic
You are here: