[Home] [By Thread] [By Date] [Recent Entries]


[Tippabhotla, Ravishanker]


>
> Consider the following document:
>
> Componets  Category          Relative URL
> ----------    --------------    -----------------------------
>                                             http://xml.apache.org
> Cocoon       Web publishing  /cocoon/index.html
> FOP            Formatting         /fop/index.html
>                                             http://alphaworks.ibm.com
> XML4J       Parsing              /tech/xml4j
> SVGView   Formatting         /tech/svgview
>
> Which of the following is the BEST model for the relationship of the
> information components?
>
There can be no real answer to the question unless more is known about how
you intend to use the xml and what your data model is.  It is as if you
asked for the best table design for a relational database.

What can be said is that

a) is like uncommented code - too obscure if people are supposed to work
with it or write it by hand,

b) Here you are treating the group url as if it were a separate row in a
table.  Instead, it is a property of the group, or otherwise it could just
be added to each url.  You could add a "baseurl" attribute to the containing
element for each group to hold it.

c) uses xml:base incorrectly - it is used for readjusting the expansion of
relative urls, and you rae not using it that way.

>    a)   <utilities>
> <ut><c3>http://xml.apache.org</c3></ut>
> <ut><c1>Cocoon</c1><c2>Web publishing</c2><c3>/cocoon/index.html</c3></ut>
> <ut><c1>FOP</c1><c2>Formatting</c2><c3>/fop/index.html</c3></ut>
> <ut><c3>http://alphaworks.ibm.com</c3></ut>
> <ut><c1>XML4J</c1><c2>Parsing</c2><c3>/tech/xml4j</c3></ut>
> <ut><c1>SVGView</c1><c2>Formatting</c2><c3>/tech/svgview</c3></ut>
> </utilities>
>
>    b)   <utilities>
> <utility><util/><cat/><url>http://xml.apache.org</url></utility>
> <utility><util>Cocoon></util><cat>Web publishing</cat>
> <url>/cocoon/index.html</url></utility>
> <utility><util>FOP</util><cat>Formatting></cat>
> <url>/fop/index.html</url></utility>
> <utility><util/><cat/><url>http://xml.alphaworks.ibm.com</url></utility>
> <utility><util>XML4J></util><cat>Parsing</cat>
> <url>/tech/xml4j</url></utility>
> <utility><util>SVGView</util><cat>Formatting></cat>
> <url>/tech/svgview</url></utility></utilities>
>
>
>    c)   <utilities>
> <resource xml:base="http://xml.apache.org">
> <utility xml:base="/cocoon/index.html">
> <component>Cocoon</component><category>Web publishing</category></utility>
> <utility xml:base="/fop/index.html">
> <component>FOP</component><category>Formatting</category></utility>
> </resource>
> <resource xml:base="http://alphaworks.ibm.com">
> <utility xml:base="/tech/xml4j">
> <component>XML4J</component><category>Parsing</category></utility>
> <utility xml:base="/tech/svgview">
> <component>SVGView</component><category>Formatting</category></utility>
> </resource>
> </utilities>
>

Tom P


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member