OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] The subsetting has begun

[ Lists Home | Date Index | Thread Index ]

"Alaric B. Snell" <alaric@alaric-snell.com> writes:

> On Wednesday 26 February 2003 16:28, Simon St.Laurent wrote:
> > alaric@alaric-snell.com (Alaric B. Snell) writes:
> > >It's not a DAG; you can't share subtrees. It's a tree!
> >
> > I share subtrees (chapters in DocBook) on a daily basis and even get
> > paid for it.
> 
> Oh, you mean by having multiple references to the same entity? True, I'd not 
> included that. And that tends to crop up in the implementation as duplication 
> of the shared subtree; each node in the DOM can only have one parent, after 
> all.
> 
> > How exactly do you mean "you can't share subtrees"?
> 
> Each node only having one parent.
> 
> This is a valid DAG:
> 
>               A
>              / \
>             V   V
>            B     C
>             \   /
>              V V 
>               D
> 
> In XML, the best you can do is:

<!DOCTYPE A [
  <!ATTLIST D id ID #IMPLIED>
  <!ATTLIST D ref IDREF #IMPLIED>
]>
<A>
  <B>
    <D id="d1">
      <any> children D might have, just to make it more interesting</any>
    </D>
  </B>
  <C>
    <D ref="d1"/>
  </C>
</A>


Ari.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS