Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 22EB1200C80 for ; Thu, 11 May 2017 02:54:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 21943160BC6; Thu, 11 May 2017 00:54:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41783160B9C for ; Thu, 11 May 2017 02:54:10 +0200 (CEST) Received: (qmail 58153 invoked by uid 500); 11 May 2017 00:54:09 -0000 Mailing-List: contact dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ws.apache.org Delivered-To: mailing list dev@ws.apache.org Received: (qmail 58141 invoked by uid 99); 11 May 2017 00:54:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2017 00:54:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5962CC16CC for ; Thu, 11 May 2017 00:54:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5OBDAZo7xuHe for ; Thu, 11 May 2017 00:54:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 29BEC5F202 for ; Thu, 11 May 2017 00:54:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5E58BE0069 for ; Thu, 11 May 2017 00:54:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0896021DF5 for ; Thu, 11 May 2017 00:54:04 +0000 (UTC) Date: Thu, 11 May 2017 00:54:04 +0000 (UTC) From: "Aron Olsen (JIRA)" To: dev@ws.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (XMLSCHEMA-48) How to inherit attributes down to final complex type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 May 2017 00:54:11 -0000 [ https://issues.apache.org/jira/browse/XMLSCHEMA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aron Olsen updated XMLSCHEMA-48: -------------------------------- Description: Hi there, I am in the scenary of traversing the out-come of reading an XSD. I am somewhat trying to simplify the output of XMLSchema, in order to have the properties (elements and attributes) mapped to DB-tables (complex types) and DB-table-columns (mayby XSD-complex, geometries for instance or other DB-complex-types or XSD-simple, string, int etc.). I am bewildered about how attributes are to be inherited down to a complex XSD type when deriving from another XSD-type by restriction. As I have learned so far, all attributes are to be inherited by default, as opposed to element-properties of the base-type. Is this rightly understood by me? In my simplified model I keep track of the base-type hierarchy, and how the inheritance is defined (extension, restriction, final). For each level I have tracked all the attributes of each complex type. Do I need to "collect" base-type attributes not referenced in a current complex type, when the current complex type is deriving from a super-type by restriction? In other words: Do XmlSchema do any automic inheritance derivations "behind the scenes", or do we have to do such on our own behalf? As you will understand: If XmlSchema is not doing the attribute-inheriting for me, I have to do it my self. This will involve "inherit all attributes from base-type which is not mentioned in current type". Hope my question is understandable: How to inherit attributes when deriving by restriction. /Aron was: Hi there, I am in the scenary of traversing the out-come of reading an XSD. I am somewhat trying to simplify the output of XMLSchema, in order to have the properties (elements and attributes) mapped to DB-tables (complex types) and DB-table-columns (mayby XSD-complex, geometries for instance or other DB-complex-types or XSD-simple, string, int etc.). I am bewildered about how attributes are to be inherited down to a complex XSD type when deriving from another XSD-type by restriction. As I have learned so far, all attributes are to be inherited by default, as opposed to element-properties of the base-type. Is this rightly understood by me? In my simplified model I keep track of the base-type hierarchy, and how the inheritance is defined (extension, restriction, final). For each level I have tracked all the attributes of each complex type. Do I need to "collect" base-type attributes not referenced in a current complex type, when the current complex type is deriving from a super-type by restriction? In other words: Do XmlSchema do any automic inheritance derivations "behind the scenes", or do we have to do such on our own behalf? As you will understand: If XmlSchema is not doing the attribute-inheriting for me, I have to do it my self. This will involve "inherit all attributes from base-type which is not mentioned in current type". Hope my question is understandable: How to inherit attributes when extending by restriction. /Aron > How to inherit attributes down to final complex type > ---------------------------------------------------- > > Key: XMLSCHEMA-48 > URL: https://issues.apache.org/jira/browse/XMLSCHEMA-48 > Project: XmlSchema > Issue Type: Question > Affects Versions: 2.2.1 > Reporter: Aron Olsen > Priority: Trivial > Fix For: 2.1.1 > > > Hi there, > I am in the scenary of traversing the out-come of reading an XSD. > I am somewhat trying to simplify the output of XMLSchema, in order to have the properties (elements and attributes) mapped to DB-tables (complex types) and DB-table-columns (mayby XSD-complex, geometries for instance or other DB-complex-types or XSD-simple, string, int etc.). > I am bewildered about how attributes are to be inherited down to a complex XSD type when deriving from another XSD-type by restriction. As I have learned so far, all attributes are to be inherited by default, as opposed to element-properties of the base-type. > Is this rightly understood by me? > In my simplified model I keep track of the base-type hierarchy, and how the inheritance is defined (extension, restriction, final). For each level I have tracked all the attributes of each complex type. Do I need to "collect" base-type attributes not referenced in a current complex type, when the current complex type is deriving from a super-type by restriction? > In other words: Do XmlSchema do any automic inheritance derivations "behind the scenes", or do we have to do such on our own behalf? > As you will understand: If XmlSchema is not doing the attribute-inheriting for me, I have to do it my self. This will involve "inherit all attributes from base-type which is not mentioned in current type". > Hope my question is understandable: How to inherit attributes when deriving by restriction. > /Aron -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org For additional commands, e-mail: dev-help@ws.apache.org