[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Reusing Locally Defined Element in the Same parentTag using "ref" ?
- From: Michael Kay <mike@saxonica.com>
- To: xml-dev@lists.xml.org
- Date: Tue, 08 Jan 2013 09:08:56 +0000
When people ask "why?" in relation to a rule in a specification, there
are two possible ways to try and answer it:
(a) historical causality: scour the minutes of the meetings to determine
when the decision was made, what arguments were put forward for and
against, and how the voting went. This is rarely possible; even those
who were present at the relevant meeting often have trouble working out
why the decision went a particular way. But when you're investigating
the absence of a feature, the most likely conclusion of such an
investigation is that no-one ever proposed the desired feature, and
therefore the committee never debated it. To find out why no-one
proposed it, you would have to ask about 50 different people why they
didn't propose it during their membership of the working group.
(b) post-hoc rationalization: that is, ask people involved in the design
process whether or not they would have supported a proposal to add the
relevant feature if such a proposal had been made at a suitable time. In
my case, I think the answer is probably that I would have opposed adding
it, on the grounds that the language is quite complicated enough
already, and the usability benefits are marginal.
Michael Kay
Saxonica
On 08/01/2013 07:09, Nishant Bulchandani wrote:
> hi,
>
> For the Snippet below :
>
> <xs:complexType name="Team">
> <xs:sequence>
> <xs:element name="Name" type="xs:string"/>
> <xs:element name="Size">
> <xs:simpleType>
> <xs:restriction base="xs:integer">
> <xs:totalDigits value="1"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
> <xs:element name="teamLeads">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="Size"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
>
>
> The element "Size" has local scope , Why Can't it be reused locally?
> Usually in Programming Languages , a local element is accessible in
> its complete Local Scope.Why isn't it implemented the same way
> here?(i.e Why is "Size" not referenceable inside the whole "Team" Tag
> )
>
>
> Thanks
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]