Hi,
After reading this article, I'm confused why client name does not
merit an element?
(http://www-128.ibm.com/developerworks/xml/library/x-eleatt.html)
On Feb 2, 2006, at 10:00 AM, Merrill, Jason wrote:
It's well formed, sure, but I would do it like this instead - make
heavy
use of attributes - as much as possible for speed, relationships, and
readability, something like this:
<root>
<clients>
<client name="Borgo di Colleoli" sector="Property">
<discipline name="Direct Mail"/>
<discipline name="Advertising"/>
</client>
<client name="Royal Bank of Scotland" sector="Finance">
<discipline name="Interactive Design"/>
<discipline name="Strategy"/>
</client>
</clients>
<sectors>
<sector name="Property" client="Borgo di Colleoli">
<discipline name="Direct Mail"/>
<discipline name="Advertising"/>
<discipline name="Channel and Sales"/>
<discipline name="Interactive Design"/>
</sector>
</sectors>
<disciplines>
<discipline name="Direct Mail" sector="Property"
client="Borgo di Colleoli"/>
</disciplines>
</root>
Preferrably if you could find a way to work this, you could also maybe
just do this to reduce redundancy:
<root>
<clients>
<client name="Borgo di Colleoli" sector="Property">
<discipline name="Direct Mail"/>
<discipline name="Advertising"/>
</client>
<client name="Royal Bank of Scotland" sector="Finance">
<discipline name="Interactive Design"/>
<discipline name="Strategy"/>
</client>
</clients>
..add more here
</root>
...and then make some use of XPath's search features to find the
opposite relationships - i.e. sector to client, discipline to sector,
etc. - though I haven't used it yet so wouldn't have an example to
share
Jason Merrill | E-Learning Solutions | icfconsulting.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Kent Humphrey
Sent: Thursday, February 02, 2006 12:01 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] xpath / xpath4as2 beginners question
On 2 Feb 2006, at 15:48, Merrill, Jason wrote:
However, not a good idea to have a child node be the same name as
the
parent node (though it's OK in the sense it that won't screw up
Xpath).
Would you believe my problem was I had product/products instead of
product/products ?!
Sheesh...
Thanks for the help.
Can I have some general XML help too please? :> Does this XML file
make sense, is it well formed?
<root>
<clients>
<client name="Borgo di Colleoli">
<sector>Property</sector>
<discipline>Direct Mail</discipline>
<discipline>Advertising</discipline>
</client>
<client name="Royal Bank of Scotland">
<sector>Finance</sector>
<discipline>Interactive Design</discipline>
<discipline>Strategy</discipline>
</client>
</clients>
<sectors>
<sector name="Property">
<client>Borgo di Colleoli</client>
<discipline>Direct Mail</discipline>
<discipline>Advertising</discipline>
<discipline>Channel and Sales</discipline>
<discipline>Interactive Design</discipline>
</sector>
</sectors>
<disciplines>
<discipline name="Direct Mail">
<sector>Property</sector>
<client>Borgo di Colleoli</client>
</discipline>
</disciplines>
</root>
I know I'm in danger of repeating my first mistake by doing
something
like client/clients instead of clients/client - but I can't think of
another way to organise it.
Observant readers may recognise this as an xml sample of my matrix/
relationships questions from a few days ago :>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
NOTICE:
This message is for the designated recipient only and may contain
privileged or confidential information. If you have received it in
error, please notify the sender immediately and delete the
original. Any other use of this e-mail by you is prohibited.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders