|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Semantic Web permathread, iteration n+1 (was Re:
> OK, 'striping' is the term I guess I have been missing. It seems to > mean: provide an appropriate container element when making a > hierarchy. No, what is meant by "striping" is that you can alternate between having element map to a property name vs. map to an item name. For example: <Person> <!-- item (s) --> <Name> <!-- property name (p) --> Joe <!-- value (o) --> </Name> <Depiction> <!-- property name (p) --> <Picture> <!-- value (o); also item (s) --> <Href> <!-- property name (p) --> joe.jpg <!-- value (o) --> </Href> </Picture> </Depiction> </Person> So, basically, you have to look at the context to determine whether an element represents a property name or an object name. The XML alternates between property name and object name based on depth, so it's kindof like "stripes". > I believe I have that by using a schema and even more so with > our gui tool. Is the XML I posted basically equal to striped RDF? Well, your XML did not go into enough layers of depth for me to tell. Normally you would only get "stripes" if you have property values which are also objects with their own sub-properties. > Why is there distaste for striping, as you mentioned? Some people dislike it, because it's not obvious when looking at a chunk of XML whether a specific element is being used an item name, or as a property name. An item can also be used as a property value, so that is not such a problem. The real issue is that property *names* are not interchangable semantically with item names or property values, so you have to treat them differently in code. So it can be confusing when they appear to be used interchangably in the XML, and it can seem rather arbitrary that you have you have to pay attention to the depth within the document to decide whether something is a (p) or an (s or o). Anyway, it's not such a terrible thing. Some people think it's more usable. A different way to do it would be more similar to what you did, which is use references: <Person name="Joe" depiction="#joe_pic" /> <Depiction href="joe.jpg" id="joe_pic" /> This way it is always consistent -- elements are always items, attributes are always property names, and attribute values are always property values. This style is also disliked by some (can't please everyone all of the time). There are other ways of doing it without stripes. For example, TriX basically just serializes the raw triples.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! 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
|
|||||||||

Cart








