473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Advice on schema design: Mixing XHTML and a custom vocabulary.

Hello!

I'm in the process of creating a schema for marking up my personal
astronomical observations (yes, I know this has already been done; I'm
not worried about that... this is a pet project). What I would like to
do is introduce an <entry> element to enclose a log entry. I would like
to include, as possible children of <entry> certain elements of my own
design and yet also allow arbitrary XHTML text to appear, perhaps in
constrained locations, for the purpose of making free form notes while
having access to the full expressiveness of XHTML. The goal is to create
an observing log that is largely just free text but to have the
astronomically significant entities marked up clearly so they could be
easily extracted by suitable indexing programs, etc, etc.

Right now my <entry> element is described by the following complexType
(abbreviated here to avoid clutter):

<xs:complexType name="entryType">
<xs:sequence>
<xs:choice minOccurs="1">
<xs:element name="datetime" type="absoluteDateTimeType"/>
<xs:element name="localdatetime" type="localDateTimeType"/>
</xs:choice>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:choice>
<xs:any namespace="http://www.w3.org/1999/xhtml"
processContents="lax"/>
<xs:element name="observation" type="observationType"/>
</xs:choice>
</xs:sequence>
</xs:sequence>
</xs:complexType>

This appears to provide largely the effect I'm after but I'm nervous
about letting the XHTML elements just roam around in such an
unconstrained way inside an <entry>. Would it be better style to enclose
them in, say, a <text> element that would be a sibling to <observation>?
Or is there a generally more acceptable way to handle this problem overall?

I'd also like to be able to include custom in-line markup inside the
XHTML text. So for example:

<xhtml:p>Tonight <planet>Jupiter</planet> was well placed for
observing</xhtml:p>.

Do I need to do:

<xhtml:p>Tonight <xhtml:span class="planet">Jupiter</xhtml:span> was
well placed for observing</xhtml:p>.

Ideally I would like to arrange things so I can formally validate as
much of my instance documents as feasible. I understand there are limits
to what can be accomplished in this regard when mixing vocabularies like
this. Or perhaps I understand wrong?

Thanks for any advice you can offer.

Peter
Jan 17 '06 #1
2 1473
Peter C. Chapin writes:
...
This appears to provide largely the effect I'm after but I'm nervous
about letting the XHTML elements just roam around in such an
unconstrained way inside an <entry>.
Looks OK to me.
I'd also like to be able to include custom in-line markup inside the
XHTML text. So for example:

<xhtml:p>Tonight <planet>Jupiter</planet> was well placed for
observing</xhtml:p>.


See Modular XHTML [1]. For an example (using DTDs, not W3C XML
Schema, but that doesn't affect the design), see RDDL [2].

ht

[1] http://www.w3.org/TR/xhtml-modularization
[2] http://www.rddl.org/
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Jan 17 '06 #2
Henry S. Thompson wrote:
This appears to provide largely the effect I'm after but I'm nervous
about letting the XHTML elements just roam around in such an
unconstrained way inside an <entry>.


Looks OK to me.


Okay, thanks. It's good to know that I'm not too far off base at least!
I'd also like to be able to include custom in-line markup inside the
XHTML text. So for example:

<xhtml:p>Tonight <planet>Jupiter</planet> was well placed for
observing</xhtml:p>.

See Modular XHTML [1]. For an example (using DTDs, not W3C XML
Schema, but that doesn't affect the design), see RDDL [2].


Modular XHTML... okay, I see where that's probably going to lead. It
sounds promising.

Peter
Jan 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gregg Williams | last post by:
Hi--I am having a problem designing a schema to fit my XML data, and I'm hoping that someone can help. Essentially, I have a schema in mind and two target vocabularies for it, where one vocabulary...
5
by: Ralf Wahner | last post by:
Dear Masters of XML As I'm new to XML Schema I dare to ask a possibly recurring question: Given an element <elem> with two attributes @a and @b. The attributes are bound by the condition, that...
2
by: Victor Engmark | last post by:
I am making an XML Schema for emails, and would like to specify that any elements from the XHTML2 namespace are allowed in the body/contents and signature/footer parts of the message (and _only_...
3
by: junlia | last post by:
We are using ACORD xml schema standard, and we need to add to it, so we choose to redefine ACORD xml schema. One of the problems that I ran into is how to add some values to an emumerated list. ...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
3
by: Sathyaish | last post by:
Thingies: - Report Definition Language (RDL) - Resource Definition Framework (RDF) - Web Service Definition Language (WSDL) - C# Application Markup Language (CSAML) - Extensible Application...
6
by: Grant Robertson | last post by:
If I use the 'any' element in my schema to allow elements from another schema to be used in instance documents based on my schema, is there a way to force that the contents of that element must be...
0
by: mk189 | last post by:
Hi, I am trying to create XML schema of custom markup language, enriched by XHTML. In simplified version, the XML documet could look like that: <a:alarm-manual xmlns:a="alarm-manual"...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.