nhibernate mapping - "extend" an xml schema -
I am trying to "extend" an XML schema (for example, nhibernate here), inside my own To connect it to the institutions. I'm stuck at the point where verification sticks to the "exm: foo" (and exm: foobar) unit, because "base" schema does not allow it. How can I manage it without changing the base schema?
Sample:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Hibernate-Mapping XMLNS = "Color: Nibinet-Mapping2.2" Assembly = "Test" Namespace = "Test.DataX Antities" XMLNs: XM = "Color: Expansion-Mapping" & gt; & Lt; Class name = "post" table = "POSTS" xmlns = "vase: nibinet-mapping-20" & gt; & Lt; Exm: foo bar = "falcon" /> & Lt; Property name = "body" type = "string" column = "body" & gt; & Lt; Exm: foobar / & gt; & Lt; / Property & gt; [...] & lt; / Class & gt; & Lt; / Hibernate-mapping & gt; Ideally, a schema allows extensions through XS in selected locations: any announcements. Unfortunately, the Nibernate schema is not. So you have to write your schema, and import the existing schema. In this kind of approach, you can get the new schema type from the existing base schema type. Unfortunately, the element of nhibernate is defined using the class
an anonymous type that you can not extend. So you have to define the elements of your class and make a copy of Neighbornet's content model, where it will be desired.
As a result, applications that process the base schema may not be able to process your extended schema, so that you must also rewrite all the tools.
Comments
Post a Comment