W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2004

Fwd: Re: RESEND: Extending xhtml? How?

From: Brad Cox <bcox@virtualschool.edu>
Date: Fri, 23 Jan 2004 17:46:04 -0500
Message-Id: <p06001812bc3751ff15a4@[68.50.169.130]>
To: Curt Arnold <carnold@houston.rr.com>
Cc: xmlschema-dev@w3.org

That's so much for the most helpful reply, Curt. I've been struggling 
with the modularization spec, trying to use the approach described 
there, but wasn't confident I was on their right track. Never managed 
to find the url you sent I'll dig into that further tomorrow.

But I'm confused by the encouraging tone of "you  could use an import 
statement and an appropriate namespace declaration to allow you to 
use XHTML elements and constructs in your schema, so you could say 
<ile:page> can contain specific elements or groups from the XHTML 
schema" and the discouraging tone of the closing one re "annotated 
XHTML".

The former sounds like just what I want, and that the technique 
described in the Modularization spec will get me there eventually, 
regardless of what the XHTML designers planned for. Is that correct?

The other confusion is why this is proving so difficult. I thought 
that problems like this were exactly what XMLSchema was designed for 
but I've found absolutely no success stories out there. It does seem 
to be possible, but man, its a bitch.


>On Jan 23, 2004, at 7:00 AM, Brad Cox wrote:
>
>>Its been a week so I thought I'd better resend this. Could someone 
>>please respond? I'm still dead in the water on this one and REALLY 
>>could use help. See http://virtualschool.edu/ale (Action Learning 
>>Environment) for the system I'm building. Thanks!
>>
>>------
>>
>>Hi. Just joined this group after weeks of fruitless struggle. Hope 
>>someone here can help with which seems (to me) a common and simple 
>>problem.
>>
>>I simply want to add a number of custom elements to XHTML. The 
>>application is a teaching infrastructure in which web pages are 
>>authored in xhtml with several custom extensions for specifying 
>>form-based questions for the students to answer. These are parsed 
>>and managed via java/jdom.
>
>I believe that XHTML 1.0 was not designed to allow custom elements 
>to be added to it.  You can use XHTML elements within other 
>documents, but there is no mechanism to change the definition of 
>xhtml:body, for example, so that it can contain an ile:submission 
>element.
>
>>
>>I've attached my best shot to date, which works for my custom 
>>stuff, but refuses to attach them to xhtml. I'm pretty sure I'm not 
>>even on the right track with the <xsd:any/> stuff, but not sure 
>>where the right track is. I suspect <xsd:include> is required, but 
>>no idea *what* to include.
>
>What you've done is to allow any element from any namespace to 
>appear in several places.  If you had a schema for XHTML 
>(http://www.w3.org/TR/xhtml-m12n-schema/schema_module_defs.html), 
>you  could use an import statement and an appropriate namespace 
>declaration to allow you to use XHTML elements and constructs in 
>your schema, so you could say <ile:page> can contain specific 
>elements or groups from the XHTML schema.
>>
>>To be clear, what I want is for my custom elements, <textField>, 
>>and friends, to be allowed whereever <p>, <b>, etc are allowed in 
>>xhtml. Can someone here help? Thanks!
>>
>>PS: In my world, <page>s live within <task>s, and pages are 
>>equivalent to xhtml <body> elements. In other words, <textField>, 
>><p>, <h1>, etc should be allowed inside pages, not tasks.
>>--
>
>If you want your documents to be annotated XHTML, I believe your 
>only options are to use processing instructions or comments which 
>would require no schema definitions (and would provide no validation 
>of your annotations).
>
>What you are describing appears to be within the scope of XForms 
>(http://www.w3.org/MarkUp/Forms/, http://www.w3.org/tr/XForms) which 
>is a W3C recommendation.  After you have digested that, that might 
>be a better forum for addressing how to design your system.


-- 
Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu
        http://virtualschool/ale Action Learning Environment
http://virtualschool.edu/mybank Digital Rights Management System
    http://virtualschool.edu/jco Java Cryptographic Objects (JCO)
   http://virtualschool.edu/jwaa Java Web Application Architecture (JWAA)
  http://virtualschool.edu/java+ Java Preprocessor (Java+)
Received on Friday, 23 January 2004 17:49:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:41 GMT