473,407 Members | 2,326 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,407 software developers and data experts.

XHTML Modularization: Creating XML schema for mixed custom tags andXHTML

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"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="alarm-manual alarm-manual.xsd"
>
<h:p>Text ... <a:par-value name="myName"/... text </h:p>
</a:alarm-manual>

In full version, the root element and document structure elements are
from custom namespace, the "formating" elements are from xhtml
namespace, and there are also some inline elements from custom
namespace.

I've tried to create XML Schema based on http://www.w3.org/TR/xhtml-modularization
, however I do not know whether it is correctly done. I have created
two new xsd files:
XML Schema driver: amml.xsd
and custom module definition: amml-module.xsd
(both files see below, of course other XHTML schema files must be
added)

Can someone with better knowledge of XML Schema and/or XHTML
modularization comment it?
Thanks a lot, regards, Martin

<!-- amml.xsd -->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:amml="alarm-manual"
blockDefault="#all">
<xs:annotation>
<xs:documentation>
This is the XML Schema driver for AMML
</xs:documentation>
</xs:annotation>
<xs:import
namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd">
<xs:annotation>
<xs:documentation>
This import brings in the XML namespace attributes
The XML attributes are used by various modules.
</xs:documentation>
</xs:annotation>
</xs:import>
<!--
<xs:include
schemaLocation="xhtml11.xsd">
<xs:annotation>
<xs:documentation>
Schema that includes original driver for XHTML 1.1
</xs:documentation>
</xs:annotation>
</xs:include>
-->
<xs:redefine
schemaLocation="xhtml11.xsd">
<xs:annotation>
<xs:documentation>
Changes in XHTML 1.1 due to AML
</xs:documentation>
</xs:annotation>
<xs:group name="xhtml.Inline.extra">
<xs:choice>
<xs:group ref="xhtml.Inline.extra"/>
<xs:group ref="amml:amml.par-value.export"/>
</xs:choice>
</xs:group>
</xs:redefine>

<xs:import
namespace="alarm-manual"
schemaLocation="amml-module.xsd">
<xs:annotation>
<xs:documentation>
Document Model module for the AMML
This schema file defines all named models used by AMML
</xs:documentation>
</xs:annotation>
</xs:import>
</xs:schema>

<!-- amml-module.xsd -->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="alarm-manual"
xmlns="alarm-manual"
xmlns:html="http://www.w3.org/1999/xhtml"
>
<xs:annotation>
<xs:documentation>
This module defines all elements and attributes of private Alarm
Manual ML.
</xs:documentation>
</xs:annotation>

<!-- alarm-manual element-->
<xs:attributeGroup name="amml.alarm-manual.attlist">
<xs:attribute name="name" type="xs:string"/>
</xs:attributeGroup>
<xs:group name="amml.alarm-manual.content">
<xs:annotation>
<xs:documentation>
The root element of AMML.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group maxOccurs="unbounded" minOccurs="0"
ref="html:xhtml.Flow.mix"/>
</xs:sequence>
</xs:group>
<xs:complexType name="amml.alarm-manual.type">
<xs:group ref="amml.alarm-manual.content"/>
<xs:attributeGroup ref="amml.alarm-manual.attlist"/>
</xs:complexType>

<!-- par-value element-->
<xs:attributeGroup name="amml.par-value.attlist">
<xs:attribute name="name" type="xs:string"/>
</xs:attributeGroup>
<xs:group name="amml.par-value.content">
<xs:sequence/>
</xs:group>
<xs:complexType name="amml.par-value.type">
<xs:group ref="amml.par-value.content"/>
<xs:attributeGroup ref="amml.par-value.attlist"/>
</xs:complexType>

</xs:schema>
Jun 27 '08 #1
0 3330

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

Similar topics

0
by: Peter Rohleder | last post by:
Hi, I have a few simple questions in order to use modularized xhtml and getting it to work. A simple example may make this obviouse: Lets say we want to create a simple xml-file to reflect...
7
by: Biblin | last post by:
Is there a way of allowing XHTML tags in an XML document without including them as #PCDATA? I have a DTD for my document but want to include the XHTML DTD as well to allow these extra tags. Can...
4
by: Luke Dalessandro | last post by:
I have some XML data that has mixed content XML tags that embed XHTML tags, for instance: <note>Somebody wrote this note in XHTML and wanto to <a href="link.html" target="_new">link</a> to a...
82
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a...
2
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This...
12
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
2
by: Peter C. Chapin | last post by:
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)....
11
by: Kidogg | last post by:
Hi all, I'm attempting to write a validator for some email template files we use as part of our e-commerce application (incidentally in C#) and I've run into a problem as I'm not a huge user of...
0
by: C.W.Holeman II | last post by:
As K&R state the hardest part is getting a first instance to work. So I am looking for a "hello, world!" example for adding an additional element to an XHTML file. <html> <head><title>Hello,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.