XSD Inheritance: Is it possible

Hi ,
I wasnt sure where to post this, As its some wher related to xml, I am posting it here.
I have a xsd {a1.xsd} which has many elements of complex type and now my requirement is to write a new xsd {b1.xsd} , This new xsd has many elements that are common to a1.xsd , But it {b1.xsd} has its own new xsd elements. I was wondering if there is some way of inhertance in xsd. I would like to place the common elements of a1.xsd and b1.xsd into common.xsd, Further i want both a1.xsd and b1.xsd to inherit the common.xsd {Or shd be possible to use the elements}. {Some kind of inheritance} so that i should be able to reuse. Why am i talking all this is because. Once i have the xsd'd i want them to unmarshall them in to JAva classes using JAXB, All the complex types of xsd'd will be converted to java classes. If i have few types in xsd common then i could redunce the number of classes {As they are common , This would reduce redundant code}
I am not sure even if this is possible and is this a good way of doing it.
Hope you understood my problem.
Thanks
deepak

xsd:extension is used for this, see
http://www.w3schools.com/schema/el_extension.asp

Similar Messages

  • BODS with xsd:extension

    Hi all,
    we have a xsd with inheritance and want to prossed this in BODS. Now we have the question, if this function is possible?
    If yes, how can we build this in BODS?
    At the moment BODS dosen´t recognize inherited elements.
    Thanks & best regards
    Thomas

    Hi Thommas,
    Did you find your answer? I am trying to load xml files with xsd inheritance too but I am getting an error when executing the job.
    It looks like the namespace of the nested xsd is not recognized in execution time. At design stage is properly recognized though.
    By the way, I am using BODS 14.0.1
    Thank you in advance,
    Sergio

  • EJB 3.0 Inheritance problem

    I have to persist classes Cat, BullDog and StBernard:
    class Animal {
    private int animalId;
    private String name;
    private String dtype;
    class Dog extends Animal {
    private int dogId;
    private String furColor;
    class BullDog extends Dog {
    private int bullDogId;
    private int fightCount;
    class StBernard extends Dog {
    private int stbernardId;
    private int livesSaved;
    class Cat extends Animal {
    private int catId;
    private String preferredCatFood;
    }Planned inheritance strategy is joined table strategy. There is no problem mapping and persisting Cat and Dog tables into database, but I cannot find a way how to annotate StBernard and BullDog classes to persist them. Is it possible at all?

    do you know any official doc or reference where I can find statement, that such inheritance is not possible? i.e. only one level inheritance is allowed in JPA? Will check @SecondaryTable to see if it is helpful or not.
    @SecondaryTable This annotation is used to specify a secondary table for the annotated entity class. Specifying one or more secondary tables indicates that the data for the entity class is stored across multiple tables.@SecondaryTable is not for me :(
    Edited by: marekst on Feb 7, 2008 6:36 AM

  • Inheritation of tax codes in G/L balance sheet accounts (New GL)?

    Hello everybody,
    one of my customers is migrating to New GL, where they want to use document split for some fields.
    For some balance sheet accounts the they also want to inherit the tax code to the balance sheet account line (for reporting purposes).
    Is it possible to inherit also the tax code to a splitted balance sheet line?
    Thanks in advance for any help,
    Angela

    Hi Angela,
    as Nauma already posted, inheritance is only possible for document split characteristics and tax code is not such a characteristic.
    But even if its possible to inheritate / substitute the tax code into the BS sheet line item, what if the posting contains different tax codes (eg visiting an austrian restaurant: the bill contains 10% VAT items (Food) as well as 20% VAT items (beverages wo milk))?
    What should be the rule for BS account tax code? So the requirement sounds strange...
    Best regards, Christian

  • XML validation against schema in XSD format

    I have a requirement for validation of XML file against XML schema(XSD format). Using IXML liabrary I know how to validate XML file against schema in DTD format. But i am not getting how to do it against XSD. Is it possible using IXML liabrary? Also i wanted to know how to attach one XML or CSV file into another XML file using SAP ABAP.
    Please provide solution!!

    Hi Madhura,
    see here my comparison of the web version against the local file version on my Windows box (which is itself not the fastest): It makes a factor 16 in difference!
    C:\Temp\xsdvalidator>java XsdValidator madhu.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 16353 ms
    C:\Temp\xsdvalidator>java XsdValidator madhu_local.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 994 ms
    Obviously, the w3c.org domain that you specified as ressource location is very slow - and, as the FAQ shows, this delay is intentional!
    The W3C servers are slow to return DTDs. Is the delay intentional?
    Yes. Due to various software systems downloading DTDs from our site millions of times a day (despite the caching directives of our servers), we have started to serve DTDs and schema (DTD, XSD, ENT, MOD, etc.) from our site with an artificial delay. Our goals in doing so are to bring more attention to our ongoing issues with excessive DTD traffic, and to protect the stability and response time of the rest of our site. We recommend HTTP caching or catalog files to improve performance.
    --> They don't want to have requests to their site from productive servers all around the world.
    Regards,
    Rüdiger

  • XSD structure

    Hi,
    I want to create form designer using XSD document. The idea is like load XSD file, retrieve the structure, display structure in some ui and allow user to select elements
    and place in designer window.
    Hence I want to retrieve tree structure from XSD file. The XSD may contain any possible elements, types as defined in W3C Schema.
    Is anyone aware of any API that can help to get the structure.
    For more details refer following xsd
    <?xml version=...?>
    <schema....>
    <element name="person">
    <complexType>
    <all>
    <element name="firstName" type="string"></element>
    <element name="lastName" type="string"></element>
    <element name="company" type="tns:companyType"></element>
    </all>
    </complexType>
    </element>
    <complexType name="companyType">
    <all>
    <element name="name" type="string"></element>
    <element name="address" type="string"></element>
    <element name="zipcode" type="string"></element>
    </all>
    </complexType></schema>
    The output will be similar to following
    person
    -firstName
    -lastName
    -company
    -name
    -address
    -zipcode

    curiousmind wrote:
    Forgot to mention DOM parser will not help me. You know how complex XSD can be, the example i have given is very hypothetical.
    The elements and its types can be nested by any hierarachy.Huh?
    An XSD is a valid XML file. By definition.
    Thus DOM can very assuredly create and parse an XSD. Along with anything else that can deal with XML in general way.

  • Native xsd to string variable

    I have a variable defined by a native xsd. Is it possible to write out the text from the native xsd variable to a string instead of a file??
    Thanks,
    Sean.

    anyone??

  • 997 generation with custom ecs and xsd

    I am able to generate the 997 using the default 997.ecs and 997.xsd. The generated X12 997 has 6 segments but we need to send only 4 segments. I have created a new ecs and xsd (deleted the two segments) using the spec builder. When I use this custom 997 document, it throws below error.
    Error Brief : Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. The values are not equal.
    The XML payload shows data for the two segments that I have deleted from the ecs in specbuilder. I thought B2B would generate the xml payload based on the ecs and xsd.
    Is it possible to generate a customized 997 in B2B?
    Thanks
    Ismail M.

    Is it possible to generate a customized 997 in B2B?No, B2B may not auto-generate the customized 997. For customization cases, it is recommended to handle FA at middleware (SOA layer) or at back-end.
    Regards,
    Anuj

  • Extending the Resource XML Schema XDBResource.xsd

    Hi,
    Is anybody could share an expirience about extending
    the Resource XML Schema XDBResource.xsd ?
    I want to use XML DB as document repository.
    I want to use some application parameters (for
    example document varchar id and so on) as resource
    properties. I read from Oracle documentation, that
    one way is to extend the Resource XML Schema XDBResource.xsd.
    Users will put documents using WebDAV, so new schema
    should be used default instead of XDBResource.xsd.
    Is it possible ?
    Thanks in advance
    Viacheslav

    Thos is an error in the documentation. Extending the Resource Schema is not currently supported. We are considering this for a future release of the product. XML DB does allow small amounts of user defined meta data to be added to a Resource.....
    For Instance Given the following package
    create or replace package xdb_namespaces
    as
    RESOURCE_NAMESPACE constant VARCHAR2(128) := 'http://xmlns.oracle.com/xdb/XDBResource.xsd';
    METADATA_NAMESPACE constant VARCHAR2(128) := 'http://xmlns.oracle.com/xdb/userMetaData';
    RESOURCE_PREFIX_R constant VARCHAR2(128) := 'xmlns:r="' || RESOURCE_NAMESPACE || '"';
    METADATA_PREFIX_M constant VARCHAR2(128) := 'xmlns:m="' || METADATA_NAMESPACE || '"';
    end;
    select * from all_errors where owner = 'XDB'
    create or replace public synonym XDB_NAMESPACES for XDB_NAMESPACES
    grant execute on XDB_NAMESPACES to public
    The following procedure can add metadata to the ANY defined by the current resource Schema
    procedure addUserMetaDataNode(OID varchar2)
    as
    metadata_xml XMLTYPE := XMLTYPE('<m:UserMetaData ' || XDB_NAMESPACES.METADATA_PREFIX_M || '/>');
    begin
    update /*+ NO_TRIGGER */ XDB.XDB$RESOURCE r
    set r.xmldata.RESEXTRA = metadata_xml.getClobVal()
    where sys_nc_oid$ = hextoraw(OID)
    and existsNode
    object_value,
    '/r:Resource/r:Contents',
    XDB_NAMESPACES.RESOURCE_PREFIX_R
    ) = 1
    and existsNode
    object_value,
    '/r:Resource/m:UserMetaData',
    XDB_NAMESPACES.RESOURCE_PREFIX_R || ' ' || XDB_NAMESPACES.METADATA_PREFIX_M
    ) = 0;
    end;
    Note that this is not a SUPPORTED method of doing this.. Once the UserMetaDataNode has been added additional metadata can be added using updateXML with an XPATH that targets the UserMetaData node.
    A Future release of XML DB will provide a facitlity to attach a row in a schema based XML table, containing user defined meta data to a resoure, in the same way that the defaultTable mechanisim allows the content of a resource to be stored in an XMLType table.

  • Inheritance of IT1222 OM (ECC6)

    Hi gurus
    According to the documentation inheritance should be possible for IT1222 in OM along the evaluation path specified in IMG. However after completing the following steps, inheritance is still not working.
    u2022     Go to table T77OMATTR
    u2022     Create a scenario = ZOM - Organisational Management
    o     Specify subtype and evaluation path for inheritance under Saving and Inheritance Path = Subtype 80 and evaluation path = ZCOMP (O-S-S)
    u2022     Create an attribute for the scenario = CRB - CRB Check Required
    u2022     Associate attributes to scenarios = ZOM¦CRB
    o     Specify inheritance type = Local values overwrite inherited values
    u2022     Specify which object types the scenario¦Attribute apply to = O/S
    Additionally executed function module: HR_GENAT_READ_ATTRIBUTES but still no success
    Has anyone been able to get this inheritance working and advise on the process they followed?
    Any help will be greatly recieved.
    Many thanks
    Sarah

    Hi Imran,
    Inheritance is  the poweful beneits of relationship betwenn org objects
    oovw is the tcode and a/b xxx is the relationship
    a-passive
    b-aggressive /active
    a/b 002
    a/b 003 etc
    t777i table tell us object per infotype
    when the orgunit is assigned a relationship with costcenter for ex a011 all the subordinate org units also are mapped to the same cost centre -an example of inheritance.
    you might have to chk org management->infotype settings->working time.
    there are two customising tables
    as a best practise the work schedule is assigned to root org unit and mark it as standard working time ,this is then inherited by all subordinate org units .then 1011 can be created where the specific org unitsor positions do not follow the deafult.
    sap press book -sylvia chaudoir will serve as a good ref guide for om.
    please note  in PA component 0007 is used to check agianst the work scheduled assigned to org unit or position .although the work schedule information stored in org plan does not provide defaults to assign data to the employee ,it is useful for data entry checks.if there is any inconcistencies the warning message is prompted to correct inconcitency.
    Hope this helps.
    No Worries
    KG
    Edited by: SAPenjoy:) on Aug 29, 2010 1:18 PM

  • XSD for Opencataloginterface / ESAPO 3.5

    Hi,
    We are working with a customer who uses SRM 7.0 as procurement system and our approach is to send the shopping cart message as base64 encoded XML message back to SRM system with parameters OCI_XML_TYPE and ESAPO-3.5 as its value.
    Now according to OCI 4.0 specification document, we need to use opencataloginterface.xsd for the format of xml document and I spent hours together searching for this document in SDN and marketplace.
    Could someone point me in the right direction here? From where can I get this XSD or is it possible for someone to attach the XSD file to this thread?
    is it available in SRM server for us to download? or is it part of standard content that SAP ships?
    Ravi Shankar

    http://www.netbeans.org/community/releases/36/Whats_New.html
    It seems that support for Servlet 2.4, JSP2.0 is a feature of 3.6

  • Generating XML from XSD

    Hi,
    I'm not sure it's possible to do what I want, but can anyone confirm / deny this:
    I have a series of XSDs that I can load into the database. I want to be able to generate XML that conforms to the XSD, by passing in a series of variables - the values that I want to substitute in the XML are not held in the database, but are all calculated in PL/SQL.
    A snippet from the XML is:
    <Name>
      <PersonDescriptives:PersonNameTitle/>
      <PersonDescriptives:PersonGivenName/>
      <PersonDescriptives:PersonFamilyName/>
    </Name>I want to be able to pass in variables to supply the values in the XML, and generate it from the XSD. Is this possible?
    My gut feeling (and initial quick analysis) says that it's not - the option I've come up with so far is simple string manipulation and then I could validate the XML against the XSD to ensure that it's valid, but then I have the issue of what to do if it isn't valid!
    Any thoughts gratefully received,
    Matt
    Edited by: Darryl Burke -- advertisement and links removed

    Thanks Mark.
    I've look at the examples etc already, but they all seem to only cater for selecting from a database table. Since all my values are in PL/SQL variables rather than being in tables, I guess I could select from DUAL the whole time, but the performance of having to do it that way rather than just concatenating text together doesn't seem to make it worthwhile.
    Think I'll just stick with using string manipulation to create the XML.
    Matt

  • G/l balance sheet

    Dear All,
    in t-code fs10n my g/l acc is not balance in STO (Inter plant with same company code) the balance is occure my procedure is PO-DELIVERY & PICKING-BILLING -WRT BILLING EXCISE INVOICE DOING MIGO
    Actually in billing cenvat suspense is debit &credit but in migo cenvat clearing is credited so it shows in my g/l balance sheet in sto im not doing miri to balance cenvat clearing debited so how can i balance my g/l balance pls give ur valuable suggection.
    Regards
    Amin

    Hi Angela,
    as Nauma already posted, inheritance is only possible for document split characteristics and tax code is not such a characteristic.
    But even if its possible to inheritate / substitute the tax code into the BS sheet line item, what if the posting contains different tax codes (eg visiting an austrian restaurant: the bill contains 10% VAT items (Food) as well as 20% VAT items (beverages wo milk))?
    What should be the rule for BS account tax code? So the requirement sounds strange...
    Best regards, Christian

  • Changing datatype, afterwards Message-Mapping cannot produce target element

    Hi,
    we use PI/700.
    I changed a working system by changing a datatype of an existing message (adding a new element). My interface mapping contains two mappings: an XSL-Mapping and afterwards a Message-Mapping.
    My interface mapping looks like this:
    Message-Type A ->
          XSL-Mapping ->
    Message-Type B ->
          Message-Mapping ->
    Message-Type B
    When I test each mapping alone everything works fine (with the new element I added).
    But if I test my interface mapping in IBD with both mappings together, I'll get an error:
    "Cannot produce target element /MT_EDM_OUTBOUND_LASTGANG_TO_SAP/LASTGANG/MASSEINHEIT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".
    Is it possible that XI has problems in refreshing the XSDs?
    I tried this:
    (1) I changed my Message-Mapping and now all elements are mapped 1:1 -> no success!
    (2) Later I changed my Message-Mapping and build in "exists" with "if" to check whether the element "MASSEINHEIT" is generated by the XSL-Mapping -> It doesn't exists (??? - WHY? - when I test it, everything works fine)
    (2) Afterwards I changed my interface mapping and take only the XSL-Mapping (without the following Message-Mapping) -> the element "MASSEINHEIT" exists now!
    I'm totally confused!
    Any ideas?
    Regards
    Wolfgang Hummel

    Hi,
    If you have made structural changes to the data type..such as number of fields have decreased/increased..or some new fld altogether, then you have to activate the datatype..goto message mapping and then re-do the mapping...but if you have made "typo" changes like names have been changed, etc..then i think it should be alrite..i have sometimes made changes to my datatype, but after activating it, i had to redo the mapping..that was it!...the rest would fall into place:) No changes had to be made in the interface mapping..
    Regards,
    Sushumna

  • How to configure samba with zfs ?

    Hi,
    I'm desperately looking for an example of a working smb.conf file for solaris 10 using zfs ?
    I've been trying so many possible combinations of the available options, but I can not get it working properly.
    I want to mimic simple NT acls, including inheritance, and the possibility to add AD groups.
    I often get stuck on deny aces being generated as the first aces in the acl.
    Environment : solaris 10 with zfs, AD integration via kerberos enabled, samba 3.0.35
    smb.conf ( one of the many try-outs ... )
    [global]
    workgroup = X
    realm = X.Y.Z
    netbios name = GISSMBD
    server string = GIS DEV Samba Server
    security = ADS
    auth methods = winbind
    server signing = auto
    preferred master = No
    local master = No
    dns proxy = No
    ldap timeout = 86400
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    winbind use default domain = yes
    [share1]
    path = /path/to/share1
    force group = gis
    read only = no
    create mask = 0660
    directory mask = 0770
    force unknown acl user = yes
    acl check permissions = no
    ea support = yes
    store dos attributes = yes
    map readonly = no
    map archive = no
    map system = no
    vfs objects = zfsacl
    nfs4: mode = special
    nfs4: acedup = merge
    Thanks in advance

    look like your on the right track, this is what i did to get things working with AD. Make sure you also have winbind installed and running, after thats done you have to edit your /etc/krb5/krb5.conf and /etc/nsswitch.conf files to be able to federate your Solaris server with AD. run net join ads -S YourDCServer -U YourADUserNAME to joing to your AD domain then restart samba and winbind. if you run wbinfo -u, it should display a list of all AD users if that works you know things are working right.
    #/etc/samba/smb.conf
    [Global]
    workgroup = domain
    netbios name = servername
    password server = domain.loc
    realm = domain.loc
    security = ads
    encrypt password = yes
    idmap uid = 16777216-33554431
    idmap gid = 16777216-33554431
    template shell = /bin/bash
    winbind use default domain = yes
    winbind offline logon = no
    winbind separator = +
    winbind enum users = yes
    winbind enum groups = yes
    winbind nested groups = yes
    log file = /var/log/samba/log.%m
    max log size = 50
    passdb backend = tdbsam
    load printers = yes
    cups options = raw
    [shared]
    available = yes
    browseable = yes
    path = /data/shared
    public = yes
    writable = yes
    valid users = @"DOMAIN+domain users"
    inherit permissions = yes
    guest ok = yes
    printable = no
    #vi /etc/krb5/krb5.conf
    [libdefaults]
    default_realm = DOMAIN.LOC
    [realms]
    DOMAIN.LOC_ = {
    kdc = YourDCServer.domain.loc
    [domain_realm]
    .domain.loc = DOMAIN.LOC
    domain.loc = DOMAIN.LOC
    [logging]
    default = FILE:/var/krb5/kdc.log
    kdc = FILE:/var/krb5/kdc.log
    kdc_rotate = {
         period = 1d
    versions = 10
    [appdefaults]
    kinit = {
    renewable = true
    forwardable= true
    #vi /etc/nsswitch.conf
    passwd: files winbind
    group: files winbind

Maybe you are looking for