CXL produced by web service is missing information

Having problems with IHMC CmapServer? Think you have found a bug? Let us know!
Forum rules
Before you post a problem or bug, please be sure you have included the version number of IHMC CmapServer, the operating system and version, the amount of RAM, and any other information that allows us to be able to replicate the problem you are having. (i.e. what were you doing when the problem occur? were you running another program (application) by the time you have the problem?)
Post Reply
magsilva
Posts: 11
Joined: Wed Oct 20, 2010 12:44 pm

CXL produced by web service is missing information

Post by magsilva »

I developed a program to covert a concept map into a nice LaTeX (pgf/tk) drawing. It worked just fine using CXL files produces by CmapTools. However, the CXL documents produced by the web service at CmapServer are different from those produced by CmapTools, missing some (importart) information.

The first difference I spotted was the XML namespace declarations (the web service configures some extra namespaces, such as soapenv="http://schemas.xmlsoap.org/soap/envelope/", xmlns:tns="http://ws.apache.org/axis2", xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#", and xmlns:cmap-ws="http://cmap.ihmc.us/xml/cmap-ws". That's not an issue, but it's strange to add those SOAP related namespaces to a Cmap (shouldn't those namespaces be declared just in the SOAP message?)

The problems really started in the 'concept-appearance elements. For each 'concept-apperance' element, CmapTools's produced CXL defines the width and height. However, CmapServer's CXL, for most of the elements, omits several attributed ('height' and 'width' are always omitted, 'min-height' and 'min-width' are missing most of the time). The same issue can be observed for 'linking-phrase-appearance-list': no 'width' or 'height' attributes are defined by CmapServer.

Example:

Code: Select all

Produced by CmapTool:
<concept-appearance-list>

            <concept-appearance id="1HPB80RKN-97Y1KZ-78W" x="334" y="355" width="124" min-width="112" height="52" min-height="22" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB89RVC-24ZYHF3-7LZ" x="463" y="43" width="159" height="82" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB85VC3-T1BKYT-7DM" x="594" y="544" width="121" height="53" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB8Q6JZ-H0V9CB-7XB" x="269" y="469" width="156" min-width="81" height="55" min-height="1" font-size="12" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB7Y5GJ-HD2ZTN-73G" x="109" y="374" width="122" height="53" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB8JP75-B01H7B-7S5" x="107" y="46" width="208" height="76" font-size="20" font-style="bold" border-shape="oval"/>

            <concept-appearance id="1HPB8643V-QWGVF4-7F6" x="793" y="512" width="121" height="49" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB7X8CS-20KDKZG-72M" x="376" y="197" width="173" min-width="150" height="86" min-height="43" font-size="32" font-style="bold" border-shape="oval"/>

            <concept-appearance id="1HPB86SRW-1NJD2TG-7G9" x="899" y="379" width="98" height="48" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB81YLK-1C7ZR75-7BJ" x="610" y="375" width="142" height="53" font-size="16" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB8CB1B-CGNTK0-7N1" x="759" y="91" width="193" height="70" font-size="18" font-style="bold" border-shape="oval"/>

            <concept-appearance id="1HPB946DQ-X46Z08-85Q" x="204" y="574" width="71" height="35" font-size="12" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB8SCSR-KYDJ77-808" x="417" y="544" width="114" height="47" font-size="12" font-style="plain" border-shape="oval"/>

            <concept-appearance id="1HPB7YYTC-2D894RH-75F" x="46" y="532" width="79" height="37" font-size="12" font-style="plain" border-shape="oval"/>

</concept-appearance-list>

Produced by CmapServer:
        <concept-appearance-list>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB80RKN-97Y1KZ-78W" min-height="22" min-width="112" x="334" y="355"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB89RVC-24ZYHF3-7LZ" x="463" y="43"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB85VC3-T1BKYT-7DM" x="594" y="544"/>
            <concept-appearance border-shape="oval" font-size="12" font-style="plain" id="1HPB8Q6JZ-H0V9CB-7XB" min-height="1" min-width="81" x="269" y="469"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB7Y5GJ-HD2ZTN-73G" x="109" y="374"/>
            <concept-appearance border-shape="oval" font-size="20" font-style="bold" id="1HPB8JP75-B01H7B-7S5" x="107" y="46"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB8643V-QWGVF4-7F6" x="793" y="512"/>
            <concept-appearance border-shape="oval" font-size="32" font-style="bold" id="1HPB7X8CS-20KDKZG-72M" min-height="43" min-width="150" x="376" y="197"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB86SRW-1NJD2TG-7G9" x="899" y="379"/>
            <concept-appearance border-shape="oval" font-size="16" font-style="plain" id="1HPB81YLK-1C7ZR75-7BJ" x="610" y="375"/>
            <concept-appearance border-shape="oval" font-size="18" font-style="bold" id="1HPB8CB1B-CGNTK0-7N1" x="759" y="91"/>
            <concept-appearance border-shape="oval" font-size="12" font-style="plain" id="1HPB946DQ-X46Z08-85Q" x="204" y="574"/>
            <concept-appearance border-shape="oval" font-size="12" font-style="plain" id="1HPB8SCSR-KYDJ77-808" x="417" y="544"/>
            <concept-appearance border-shape="oval" font-size="12" font-style="plain" id="1HPB7YYTC-2D894RH-75F" x="46" y="532"/>
        </concept-appearance-list>
rcarff
Posts: 28
Joined: Wed Mar 03, 2010 4:35 pm

Re: CXL produced by web service is missing information

Post by rcarff »

First let me apologize for not updating the CXL documentation to include the min-width and min-height attributes. These attributes will only be present if a user manually re-sizes a concept. The min-width and min-height values represent the minimum size the bounding box of the concept should be drawn.

As for the width and height attributes. As the CXL documentation states these are not required values and default to "stretch to text". If one is to "draw" a map from the CXL then they are expected to compute the bounding box of the node based on the text to be displayed, font information, text-margin, border-thickness, and any background information, even if the width and height attributes are present. As to why they are present at all, the idea was to use these values to do a "quick pre-rendering" of the map, and then in the background compute the correct width and height based on how the particular machine/OS rendered the text, but we actually never did this. The client has already computed these values, so when the export to CXL is called it is adding them, but the server never computes this information, so it does not export them.
magsilva
Posts: 11
Joined: Wed Oct 20, 2010 12:44 pm

Re: CXL produced by web service is missing information

Post by magsilva »

Thank you for the prompt reply!

Hum, that explains everything. I've just improved my parser/transformer and changed my code to use min-height and min-width (actually, first I try height/width, then min-height/min-width). It is working fine now! Fortunately tThe library I'm using to draw (latex pgf/tikz) is able to handle elements without any height or width set (although they are not as pretty as in cmaptools - I'll implement something better soon).

Regards,
Post Reply