Just a couple of sceptical thoughts on this:
- For messages and parameters, you idea is basically to use the type
number instead of the name. While writing the number might be less to
write, I doubt it is more convenient
- For fields you use the type instead of the name. This reduces the
information contained in the xml as the matching between field and value
is not given explicitly anymore but implicitly by the order they appear
in the xml file. However, as far as I know, there is no specification on
ordering for xml elements, i.e. a xml parser can actually return
elements ordered as it likes. You therefore might get wrong results or
you rely on a parser implementation, which I think is not a good idea.
After all, is not the whole idea of the XML encoding to have an easy to
read representation of messages?
++ Basil
John R. Hogerhuis wrote:
> I'd like to announce a new concept I've come up with. Well, it's more
> of a refinement really. I call it "LTK-XML-LT" or LTK-XML less-typing.
>
> Whoah... if you're concerned I'm going for weak typing here, don't
> worry: I'm talking about the kind of typing that matters: keyboarding.
>
> Today, if you want to add an ROSpec, you need to type in this monstrosity:
>
> <ADD_ROSPEC MessageID="0">
> <ROSpec>
> <ROSpecID>1</ROSpecID>
> <Priority>0</Priority>
> <CurrentState>Disabled</CurrentState>
> <ROBoundarySpec>
> <ROSpecStartTrigger>
> <ROSpecStartTriggerType>Null</ROSpecStartTriggerType>
> </ROSpecStartTrigger>
> <ROSpecStopTrigger>
> <ROSpecStopTriggerType>Null</ROSpecStopTriggerType>
> <DurationTriggerValue>0</DurationTriggerValue>
> </ROSpecStopTrigger>
> </ROBoundarySpec>
> <AISpec>
> <AntennaIDs>1 2 3 4</AntennaIDs>
> <AISpecStopTrigger>
>
> <AISpecStopTriggerType>Tag_Observation</AISpecStopTriggerType>
> <DurationTrigger>30000</DurationTrigger>
> <TagObservationTrigger>
>
> <TriggerType>Upon_Seeing_No_More_New_Tags_For_Tms_Or_Timeout</TriggerType>
> <NumberOfTags>100</NumberOfTags>
> <NumberOfAttempts>0</NumberOfAttempts>
> <T>10000</T>
> <Timeout>30000</Timeout>
> </TagObservationTrigger>
> </AISpecStopTrigger>
> <InventoryParameterSpec>
> <InventoryParameterSpecID>1</InventoryParameterSpecID>
> <ProtocolID>EPCGlobalClass1Gen2</ProtocolID>
> </InventoryParameterSpec>
> </AISpec>
> </ROSpec>
> </ADD_ROSPEC>
>
> Holy moly. Look at all those characters! That's extra "typing" we don't need.
>
> Here's what it looks like in LTK-XML-LT:
>
> <M_20 MessageID="0">
> <P_20>
> <u32>1</u32><u8>0</u8><u8>0</u8>
>
> <P_178><P_179><u8>0</u8></P_179><P_182><u8>0</u8><u32>0</u32></P_182></P_178>
> <P_183>
> <u16v>1 2 3 4</u16v>
> <P_184>
> <u8>3</u8>
> <u32>30000</u32>
> <P_185>
> <u8>1</u8>
> <u16>100</u16>
> <u16>0</u16>
> <u16>10000</u16>
> <u32>30000</u32>
> </P_185>
> </P_184>
> <P_186><u16>1</u16><u8>0</u8></P_186>
> </P_183>
> </P_20>
> </M_20>
>
> Wow, talk about compression, right? Imagine all the time you will save
> with those pesky, long constants and identifier strings. A thing of
> the past, and good riddance, I say.
>
> Plus, all your types are right out there in plain view, easy to access
> at a glance. Strong typing, here we come!
>
> Comments? Questions?
>
> -- John.
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> llrp-toolkit-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel