Re: XSD to extend a "closed" schema

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 UTC