[archstudio-dev] Change of XML format

Scott Hendrickson sahendrickson at gmail.com
Fri Jul 10 10:21:41 PDT 2015


Ah, I see. The way that we are supposed to add additional information is
through extensions, using the ext element. The hints element is actually an
extension:

<structure_3_0:ext xsi:type="hints_3_0:HintsExtension">
        <hints_3_0:hint
hints_3_0:hint="org.eclipse.swt.graphics.Rectangle:252,56,120,80"
            hints_3_0:name="bounds"/>
        <hints_3_0:hint
hints_3_0:hint="org.eclipse.swt.graphics.RGB:252,233,79"
hints_3_0:name="color"/>
      </structure_3_0:ext>

Take a look at org.archstudio.xadl3.hints for an example of how to create
one. You access extensions using the XadlUtils.getExt(...) methods.

-- Scott

On Fri, Jul 10, 2015 at 8:52 AM, Chris Wakibi <wakibic at gmail.com> wrote:

> Hi Scott,
>
> Consider the below XML tag I have extracted for a componet:
>
> <structure_3_0:component
> structure_3_0:id="component7f000001-6256bdfa-8d108ee7-0a500006"
>         structure_3_0:name="First Component">
>       <structure_3_0:ext xsi:type="hints_3_0:HintsExtension">
>         <hints_3_0:hint
> hints_3_0:hint="org.eclipse.swt.graphics.Rectangle:252,56,120,80"
>             hints_3_0:name="bounds"/>
>         <hints_3_0:hint
> hints_3_0:hint="org.eclipse.swt.graphics.RGB:252,233,79"
> hints_3_0:name="color"/>
>       </structure_3_0:ext>
>     </structure_3_0:component>
>
> If I added extra attributes to that XML description, and say it looks like
> the below (note the bold):
>
> <structure_3_0:component
> structure_3_0:id="component7f000001-6256bdfa-8d108ee7-0a500006"
>         structure_3_0:name="First Component" *stage1="1" stage2="2"*>
>       <structure_3_0:ext xsi:type="hints_3_0:HintsExtension">
>         <hints_3_0:hint
> hints_3_0:hint="org.eclipse.swt.graphics.Rectangle:252,56,120,80"
>             hints_3_0:name="bounds"/>
>         <hints_3_0:hint
> hints_3_0:hint="org.eclipse.swt.graphics.RGB:252,233,79"
> hints_3_0:name="color"/>
>       </structure_3_0:ext>
>     </structure_3_0:component>
>
> Would that break anything in Archstudio?
>
> Cheers - Chris
>
> On Fri, Jul 10, 2015 at 6:32 PM, Scott Hendrickson <
> sahendrickson at gmail.com> wrote:
>
>> Hi Chris,
>>
>> I don't quite understand what you mean by a changed format. Could you
>> give me an example?
>>
>> Thanks,
>> -- Scott
>>
>> On Thu, Jul 9, 2015 at 11:15 PM, Chris Wakibi <wakibic at gmail.com> wrote:
>>
>>> Hi Archstudio Team,
>>>
>>> If I changed the format of the XML files that Archstudio stores (and
>>> reads from), would it have any effects on the functioning of the system? I
>>> know I can create a totally new file to store the values I need to extend
>>> Archstudio, but to avoid clatter, I was thinking of using the same files
>>> for each structure.
>>>
>>> Kindly advise.
>>>
>>> --
>>>
>>> Kind Regards
>>> Chris
>>>
>>> _______________________________________________
>>> archstudio-dev mailing list
>>> archstudio-dev at uci.edu
>>> https://maillists.uci.edu/mailman/listinfo/archstudio-dev
>>>
>>>
>>
>
>
> --
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillists.uci.edu/pipermail/archstudio-dev/attachments/20150710/2051c44b/attachment-0001.html>


More information about the archstudio-dev mailing list