- From: George Cristian Bina <george@oxygenxml.com>
- Date: Tue, 19 Jan 2010 11:03:06 +0200
- To: sweavo <public07@soycarretero.com>
- CC: xmlschema-dev@w3.org
You may look also into NVDL. That allows validating the configuration file without your additional attributes against the initial schema and you can allow or validate your attributes against a schema that defines them. A sample NVDL script that validates the configuration file and allows your attributes is below <?xml version="1.0" encoding="UTF-8"?> <rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"> <anyNamespace> <validate schema="official.xsd"> <mode> <namespace ns="http://www.example.com/myeditor" match="attributes"> <allow/> </namespace> <anyNamespace><attach/></anyNamespace> </mode> </validate> </anyNamespace> </rules> Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com sweavo wrote: > > > George Cristian Bina-2 wrote: >> 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> >> > > Thanks for the suggestion. This could end up being a suitable workaround. > But really it is not an ideal solution because the myeditor:x and y > attributes really do belong to the dom node; as a PI they are a sibling in > the DOM and rely on third parties maintaining the sequence and not putting > additional elements in between.
Received on Tuesday, 19 January 2010 09:03:35 UTC