|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML and XPATH: How do they work?
I'm not sure where XPath comes into this. As far as I can
see the task you are engaged in is deciding how to represent your data in XML
form. That's a question of data modelling, and then translating the data model
into an XML schema or DTD (either explicit or "in your head").
XPath only comes into play when you start processing the
data.
It seems your concern is how to define relationships
between elements in your data. Some people believe strongly that every object in
your model should have a URI and all relationships should be expressed using
that URI. My personal view is, use whatever name or key arises naturally in the
application. So don't do
<next>http://modern-greek-verbs.tripod.com/agapao.xml</next>
instead do
<next>agapao</next>
since that's a sufficient identifier. You can worry about
how to render this as a hyperlink when the time comes to consider transforming
the XML into HTML.
I'm actually wondering whether this <next> element is
needed in your XML at all? Does it hold any information that couldn't be
reconstructed from other things in the XML, or is it just a navigation aid? If
the latter, it may be better to leave it out entirely.
http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||







