[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: so many options no idea where to begin


return from stdout
"Thomas B. Passin" wrote:
> 
> [Rick Jones wrote long and thusly -]
> >...
> > <!-- I would like to be able to include a file of just test and
> > server elements without a containing <netperf></netperf> -->
> 
> Ultimately an xml file has to exactly one root element, so at some
> point you have to end up with one.

I can accept that, I just don't want to have another root element as a
subelement of the including document

> > *) i'm not sure when one "should" use attributes versus a nested 
> >    element
> >
> 
> Ah, always good for an argument!  There are two points of view:

I thought it might be :)

> 1) Use attributes when the data is flat - i.e., just name/value pairs.
> 2) Use attributes to annotate their elements, that is, as a kind of
>    meta data.
> 
> There are very good aguements to be made for both viewpoints.
> 
> I would say just do not worry about it, but if your data is completely
> flat you may want to think about whether you need XML at all (but it
> will probably turn out to be more flexible and useful than you expect).

That is my hope. While my config file isn't going to be the Marianas
Trench in depth, it isn't quite flat.

> If you always expect to keep all the data values together as a group,
> it matters the least whether you use elements or attributes.  If you
> think you may want to rearrange and subset data items, elements will
> probably make that easier, at least if they have some logical
> relationship that can be expressed by containment (I mean, as child
> elements).

I guess I'm leaning towards 2 - make something like the address family
an attribute of the hostname, have a units attribute for socket buffer
and send sizes and such.

> > *) my config files may become quite large - XInclude sounds
> >    interesting, but a fully formed file XIncluded (at least via
> >    libxml) has the whole file as a sub-element when what I really
> >    want (I think anyway) is the elements in the file being included
> >    be at the same depth as the include itself (ie up one level)
> >
> 
> To me this begs to be handled with xslt. 

Gaak, YATLA :)

> You would write a simple driver file (in xml) for each test suite that
> you want to instantiate.  You run the driver against a stylesheet.  The
> stylesheet would take care of pulling in all the parts, to the desired
> depth, customizing, and assembling them.  The only drawback is that
> xslt is one more thing to learn, and as an oldline C person it may seem
> foreign and strange.   But you can get plenty of help!  I have gotten
> very fond of xslt, to my surprise.

I'll keep that in mind and will probably go that route in phase two or
something. 

> > *) since I am interested in things like doubles and 64-bit integers
> >    and such i think i want to use XML schemas (?) but those seem to
> >    be still rather new and not part of libxml - are they part of any
> >    other C-based offering.
> >
> 
> Depends on how you want to use it.  You could always do a system call
> and parse the return from stdout.

What, do something Unix-like?-)

> > *) when someone adds a new test suite, I'd like them to be able to
> > include a validator (schema?)  that will be [expletive deleted]-in to the main
> > config file. however, i'm concerned about what I read about
> > namespaces (which I think I may need/want to avoid name conflicts)
> > and validation, and it seems that the validators have to be all
> > specified at the top of a document?
> >
> 
> Namespaces - hmm - you would have to say more about what you need to
> distinguish by using namespaces.  I do not think you need to be
> "concerned", but you have to work out where they will be, if you will
> have one schema that imports others, and such-like matters.  If you had
> different classes of tests that were structured fundamentally
> differently from each other, you might use different namespaces for
> them, with one for common things like network parameters, but I do not
> thing you will find much need for many namespaces.  Besides, once you
> have decided what they are they will be fixed, I would think.

OK, I'll not worry about namespaces just yet.

thanks for the tips

rick jones
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.