XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] When you create a markup language, what do yourparent elements =?UTF-8?Q?mean=3F=20What=20do=20your=20children=20element?==?UTF-8?Q?s=20mean=3F?=

 On Thu, 29 Sep 2011 13:29:22 -0600, Jim Melton <jim.melton@oracle.com> 
 wrote:
> Further to the use of XML parent and child elements for
> representation of documents, I'm surprised that nobody has used the
> following example:
>
> <paragraph>This is a sample paragraph that has some <emphasis
> kind="italics">text markup</emphasis> embedded within it.  
> <quote>This
> is a common situation</quote>, said the author.</paragraph>
 ...
> I don't think that anybody could reasonably claim that the <emphasis>
> child element has any definitive relationship to the <paragraph>
> element other than simple containment.  As Liam suggested, this is an
> example of a parent-child relationship that has nothing to do with a
> "has-a" relationship.  That is, <emphasis> is not a property of the
> object <paragraph> (and I find referring to <paragraph> as an 
> "object"
> not all that helpful anyway, although it's certainly not "wrong" to 
> do
> so).

 Ah, I think that is because the wrong level of markup is being used to 
 expose the has-a.

 If you said
 <paragraph>This is a sample paragraph that has some <CONCEPT
 kind="italics">text markup</CONCEPT> embedded within it.  <quote>This
 is a common situation</quote>, said the author.</paragraph>

 then you could certainly say "This paragraph has-a CONCEPT", in the 
 sense that the
 CONCEPT is metadata that reflects some categorizing property attached 
 to the paragraph.
 In that case it happens to be declared inline, but it could be declared 
 as an attribute too:

 <paragraph  CONCEPT="text markup">This is a sample paragraph that has 
 some <emphasis
 kind="italics">text markup</emphasis> embedded within it.  <quote>This
 is a common situation</quote>, said the author.</paragraph>

 In other words, if an explicit relationship is intended, then you need 
 to move away from
 generic semi-presentational elements (such as emphasis) to more 
 specific semi-semantical
 element names (such as CONCEPT or keyword etc.)

 Otherwise, all you are left with is the raw semantic of tags, that they 
 delimit ranges of
 text.

 Cheers
 Rick


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS