473,409 Members | 1,970 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,409 software developers and data experts.

Extending an existing XML format

Hi,

I want to design an XML format for my application. Documents using
this format will describe LDAP classes and attributes. I have found
the DSML format ( http://xml.coverpages.org/dsmlv1.html ) which does a
part of what I want.

But I want to add some information to it. For example, with DSML I can
write :

<dsml:attribute-type
id="myAttribute">
<dsml:name>myAttribute</dsml:name>
<dsml:description>Some description</dsml:description>
<dsml:object-identifier>1.2.3.4.5.6.7.8.9</dsml:object-identifier>
</dsml:attribute-type>

And I need more information, like :

<dsml:attribute-type
id="myAttribute">
<dsml:name>myAttribute</dsml:name>
<dsml:description>Some description</dsml:description>
<dsml:object-identifier>1.2.3.4.5.6.7.8.9</dsml:object-identifier>
<schema-guid>{4f56d89ed-4578-32c9-456e-4879cf3641ab}</schema-guid>
<indexed>true</indexed>
</dsml:attribute-type>

What are the best practices to extend an existing XML format ? If I
add some elements, will the document still respect the original
schema ?

DSML use xmlns:dsml="http://www.dsml.org/DSML" (don't try this uri, it
is broken)

if I write my namespace, can I refer to the DSML namespace ? Same
question for a XML Schema.

I read the XML docs but did not understand everything. I searched the
web without success. If there are some examples you can just show me.

Thank you very much

François

May 18 '07 #1
1 1692
Schemas can be allow themselves to be extended via extension/restriction
of complex types; see the Schema Structures document for a discussion of
how to do this. (Look for discussion of "derivation" and "derived types")

http://www.w3.org/TR/xmlschema-1/#Co...pe_Definitions

However, schemas can also impose limits on derivation, so whether you
can create a derived type that adds the fields you want will depend on
how the original schema was written. Read that schema, or try it and see
if it works.
if I write my namespace, can I refer to the DSML namespace ? Same
question for a XML Schema.
Schemas can refer to things defined by other schema documents.

Namespaces don't "refer to" anything; they are only a way to manage the
names of things so we don't wind up with conflicting definitions of the
same element or attribute.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 19 '07 #2

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

Similar topics

75
by: David MacQuigg | last post by:
Seems like we need a simple way to extend Python syntax that doesn't break existing syntax or clash with any other syntax in Python, is easy to type, easy to read, and is clearly distinct from the...
8
by: Anthony Williams | last post by:
Morning all, I'm having a wee problem with a project I'm working on at the moment. I'm leading my company into producing a website, based upon Web Standards, which will be created using XHTML...
4
by: Brandon Miller | last post by:
All, I have an existing business object (VB.Net) which returns user IDs for our locations in our regions. One of the properties objReg.Manager returns the manager's user id (integer) for a given...
3
by: Redefined Horizons | last post by:
I've got a third-part application that exposes a C API. I'd like to wrap it in Python. Is there a specific forum that covers extending and embedding Python, or are those type of questions O.K. on...
2
by: A. Farber | last post by:
Hello, I'm programming a web application and for that I'm trying to extend the standard C string functions, so that they can handle the application/x-www-form-urlencoded format (which encodes...
21
by: Daz | last post by:
Hi everyone. I am trying to create an extension of the mysqli class within PHP, and I am finding it quite difficult. I am fairly new to PHP classes, and decided to give them a go. Here's what I...
17
by: Rudi Hausmann | last post by:
Hi! I have some legacy code. DIVs are used to be dragged and dropped. Some checks are made. For the checks information is taken out of the DIVs id. Now my question is: Where else could I take...
7
by: Maximus Decimus | last post by:
HI all, I am using python v2.5 and I am an amateur working on python. I am extending python for my research work and would like some help and guidance w.r.t this matter from you experienced...
1
by: Andreas M. | last post by:
Hi, I could not get info for this on irc.freenode/#xml. I want to extend the ATOM spec with my own namespaced stuff. For this I need to add both some new attributes to the Atom elements as...
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
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.