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

Re: XSD to extend a "closed" schema

From: George Cristian Bina <george@oxygenxml.com>
Date: Tue, 19 Jan 2010 08:16:06 +0200
Message-ID: <4B554E26.9080704@oxygenxml.com>
To: sweavo <public07@soycarretero.com>
CC: xmlschema-dev@w3.org
You can just use PIs and keep the schema as it is.

For example instead of

<official:configitem official:name="a_name" myeditor:x="100"
myeditor:y="100"
myeditor:colour="red"><official:childelement....></official:configitem>

you can have:

<?myeditor x=100 y=100 colour="red"?>
<official:configitem official:name="a_name">
   <official:childelement....>
</official:configitem>

Best Regards,
George
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

sweavo wrote:
> Hi All,
> 
> Apologies if this has been done to death, I'm not even sure of what search
> terms might help me here. I've googled and read around but seem to be stuck.
> 
> I have a schema (that I'm not allowed to edit) that specifies how
> configuration files should be laid out.  From time to time I receive an
> update from the committee in charge and the new version must be used.
> 
> I have written several tools for editing these config files, and it would be
> nice to embed information in the XML (instance document) for the tools to
> use when manipulating the XML. So I'm looking for the file to contain
> something like:
> 
> <official:configitem official:name="a_name" myeditor:x="100"
> myeditor:y="100"
> myeditor:colour="red"><official:childelement....></official:configitem>
> 
> I have googled and read several pages and it looks like I can only do this
> if the type definitions in the official XSD include an anyAttribute
> declaration (unfortunately that declaration is not present in the official
> XSD).
> 
> Can anyone confirm or deny whether this is true?
> 
> Or is there a way for me to declare in the myeditor XSD that attribute x can
> be applied to any element in the official namespace...?
> 
> Thanks in advance...
> 
Received on Tuesday, 19 January 2010 06:16:37 GMT

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