[
Lists Home |
Date Index |
Thread Index
]
Perhaps I am simplifying a bit, but I think that the answer is clearly
yes. In fact there are plenty of patterns in existing XML tools to
handle this. In XSLT there are templates with "match" patterns. In XPath
there is (the dreaded) "//" and in SAX you can insert filters or turn on
handling based on various startElement callbacks.
This type of behavior is pretty common too, for example "Extract all
links from a document". I assume that this question has as its impetus
multiple document formats with mixed namespaces... is that right? In
this case the link example is even more useful because narrowing down
the repeatable XLink components is fairly easy.
As for English and it's grammar I think that the analogy is inherently
flawed. In English the various parts of speech must be understood in
order to determine the grammar for each part, including colloquial
usage. Joeseph's point about RDF and OWL is important here. I think that
the analogy would be simpler if you were talking about sentences as
the atomic units. Then, for example, you could have a "parser" that
extracts all quotations from the grammar and inherently underdstands
that usage in the English language.
Cheers,
Jeff Rafter
Roger L. Costello wrote:
> Hi Folks,
>
> Suppose that:
>
> 1. There exist a collection of "components", and each component is
> well-defined and understood.
>
> 2. There does NOT exist any rules which specify how the components should be
> assembled.
>
> If I assemble some of the components into a certain structure, and send the
> structure to you, will you be able to understand my structure?
>
> Let me be a bit more concrete. Suppose that:
>
> 1. There exist a collection of information components, and each information
> component is well-defined and understood. Some examples of information
> components might include - a missile information component (this component
> provides information about a missile, such as its direction, speed, warhead
> type, etc), an aircraft information component (this component provides
> information about an aircraft, such as its altitude, wingspan, speed, etc).
>
> 2. There does NOT exist any rules which specify how the information
> components should be assembled. In other words, there is no grammar which
> dictates how the components must be bound together.
>
> If I assemble some of the information components into a certain structure,
> and send the structure to you, will you be able to understand my information
> structure?
>
> Can information be transmitted in a world where the building blocks are
> understood, but no grammar exists?
>
> Is a grammar necessary for information transfer?
>
> Let me give a simple example. Suppose that:
>
> 1. There exists these three components - A, B, C. And everyone knows the
> meaning of each component.
>
> 2. There are no rules that specify how A, B, or C should be organized, nor
> the number of occurrences of each.
>
> Suppose that I create this message: AACABBAC. And I send it to you. Will
> you be able to understand my message?
>
> Consider the English language. Suppose that:
>
> 1. The English language was just comprised of a bunch of words (and each
> word is understood), ...
>
> 2. ... but there was no English grammar.
>
> If I compose a sentence using these words, will you be able to understand my
> sentence?
>
> Consider XML Schemas. Suppose that:
>
> 1. An XML Schema declares a bunch of independent elements (i.e., components)
> and each component is understood. For example, here's a Book component:
>
> <xsd:element name="Book">
> <xsd:complexType>
> <xsd:all>
> <xsd:element name="Title" type="xsd:string"/>
> <xsd:element name="Author" type="xsd:string"/>
> <xsd:element name="Date" type="xsd:date"/>
> <xsd:element name="ISBN" type="xsd:string"/>
> <xsd:element name="Publisher" type="xsd:string"/>
> </xsd:all>
> </xsd:complexType>
> </xsd:element>
>
> Here's a BookCover component:
>
> <xsd:element name="BookCover">
> <xsd:complexType>
> <xsd:choice>
> <xsd:element name="Hardcover"><xsd:complexType/></xsd:element>
> <xsd:element name="Softcover"><xsd:complexType/></xsd:element>
> </xsd:choice>
> </xsd:complexType>
> </xsd:element>
>
> Everyone understands the meaning of each component in the Schema.
>
> 2. But there is no declaration tying the components together, e.g., there is
> no overarching element declaration that relates the Book component with the
> BookCover component.
>
> If I create an XML instance document using the components and send the
> instance document to you, will you be able to understand my data?
>
> /Roger
>
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|