|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Further work on Xlink
Hi, Continuing my work on xlinks I discovered that xlink:extended elements do not fit well with hierarchical structures like required for table of content. However, simple links are better. Why? a) What's great about XML is that its structure is hierarchical. So, if a hierarchical structure is mapped into an XML element hierarchy, we have here a perfect match since when we read the XML document, the hierarchy is obvious from its structure. b) A table of content is usually a hierarchical structure. Each node of the hierarchy is a topic. Thus, in a table of content a topic may contain an other topic. The topic containing the others is more abstract and the contained topics are more particular. c) In a table of content each node (i.e. topic) is pointing to a location. Thus, there is a one to one relationship between a topic and a location. This is why the xlink:simple seems to fit the requirements. Example of a table of content using xlink:simple elements <topic xlink:type="simple" xlink:href"#chapter1" xlink:title="chapter1"> <topic xlink:type="simple" xlink:href="#section1" xlink:title="section1/> <topic xlink:type="simple" xlink:href="#paragraph1" xlink:title="paragraph1"/> <topic xlink:type="simple" xlink:href="#section2" xlink:title="section2"/> </topic> an xlink interpreter (it could be implemented in XSLT - by the way, there where no reactions when I said that an XSLT style sheet can be seen as an xlink interpreter) can deduce a hierarchical structure for these links and display them as such, for instance as: chapter1 section1 paragraph1 section2 (hope that the indentations will survive the mail agent massage - yes I said massage not message :-) Question: why not use the xlink extended to build the TOC hierarchy? Answer: because the Xlink:extended link contains anchors but itself do not refer to a resource. An xlink:extended link implies a one to many relationship. This construct seems more adapted to indexes, where each topic if found in many locations. Now a question to the group. I am not so sure after reading the recommendations if an xlink:simple could be included in an external linkset. Why would we do that? Let's imagine for a second that we want to encode a discussion thread about a document. For instance, a specification. Then a discussion thread is perfectly matched to a hierarchical structure where each node is having a one to one relationship with a location. Thus, the usage of the xlink:simple seems more appropriate than the usage of the xlink:extended in that case. But can we include xlink:simple hierarchies in external linksets? Or if we do so, is it still called a linkset or did it became a new kind of things? Cheers Didier PH Martin ---------------------------------------------- Email: martind@n... Conferences: Web New York (http://www.mfweb.com) Book to come soon: XML Pro published by Wrox Press Products: http://www.netfolder.com xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1 Unsubscribe by posting to majordom@i... the message unsubscribe xml-dev (or) unsubscribe xml-dev your-subscribed-email@your-subscribed-address Please note: New list subscriptions now closed in preparation for transfer to OASIS.
|
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








