Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Two different element types with the same name ?

Reply
Thread Tools

Two different element types with the same name ?

 
 
mike myers
Guest
Posts: n/a
 
      10-23-2012
On Tuesday, October 2, 2012 1:40:56 PM UTC+1, Ludovic Kuty wrote:
> Dear group,
>
>
>
> In the article entitled "Namespace Myths Exploded" ( http://www.xml.com/lpt/a/395 ), there is something (in fact a few things but let's focus on this one thing) that bothers me. In Myth 2 called "Universal names uniquely identify element types and attributes" we have a code sample :
>
>
>
> <?xml version="1.0" ?>
>
> <A xmlns="http://www.foo.org/">
>
> <A>abcd</A>
>
> </A>
>
>
>
> And the associated question in the text : "Do these share a single element type or do they have two different element types?". I don't understand. Ithought that the DTD will constrain the element A by telling us what is acceptable as attributes and what is acceptable as content. Once it is done, how could we get two element types ? I mean A should/could be defined as :
>
>
>
> <!ELEMENT A (#PCDATA | A)>
>
> <!ATTLIST A xmlns CDATA #IMPLIED>
>
>
>
> For me, it is just one type, not two. How could we get two different element types with the same name ? I understand that it "could" be possible to distinguish them based on the context but I don't think DTDs or W3C XML Schemas allow this. Could someone enlighten me on this matter ?
>
>
>
> Also, I would be interested in any ressource (book, article, Web page, ....) that talks about "element types" and not just "elements" and that is quite formal about XML. You may point me to the right location in the XML recommendation.
>
>
>
> TIA,
>
>
>
> Ludovic Kuty


If it helps theirs also a pretty good totorial here, http://www.liquid-technologies.com/T...torial_01.aspx
 
Reply With Quote
 
 
 
 
Ludovic Kuty
Guest
Posts: n/a
 
      11-11-2012
On 2012-10-23 12:27:10 +0000, mike myers said:

> On Tuesday, October 2, 2012 1:40:56 PM UTC+1, Ludovic Kuty wrote:
>> Dear group,
>>
>>
>>
>> In the article entitled "Namespace Myths Exploded" (
>> http://www.xml.com/lpt/a/395 ), there is something (in fact a few
>> things but let's focus on this one thing) that bothers me. In Myth 2
>> called "Universal names uniquely identify element types and attributes"
>> we have a code sample :
>>
>>
>>
>> <?xml version="1.0" ?>
>>
>> <A xmlns="http://www.foo.org/">
>>
>> <A>abcd</A>
>>
>> </A>
>>
>>
>>
>> And the associated question in the text : "Do these share a single
>> element type or do they have two different element types?". I don't
>> understand. I thought that the DTD will constrain the element A by
>> telling us what is acceptable as attributes and what is acceptable as
>> content. Once it is done, how could we get two element types ? I mean A
>> should/could be defined as :
>>
>>
>>
>> <!ELEMENT A (#PCDATA | A)>
>>
>> <!ATTLIST A xmlns CDATA #IMPLIED>
>>
>>
>>
>> For me, it is just one type, not two. How could we get two different
>> element types with the same name ? I understand that it "could" be
>> possible to distinguish them based on the context but I don't think
>> DTDs or W3C XML Schemas allow this. Could someone enlighten me on this
>> matter ?
>>
>>
>>
>> Also, I would be interested in any ressource (book, article, Web page,
>> ...) that talks about "element types" and not just "elements" and that
>> is quite formal about XML. You may point me to the right location in
>> the XML recommendation.
>>
>>
>>
>> TIA,
>>
>>
>>
>> Ludovic Kuty

>
> If it helps theirs also a pretty good totorial here,
> http://www.liquid-technologies.com/T...torial_01.aspx
>


I don't think so. When you try to compare that tutorial with a book
like Definitive XML Schema, well you really can't compare. This is not
a useful ressource. And moreover it is commercial stuff. Clearly the
focus is on a product and trying to sell that product. Are you a bot ?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it correct? Two same named classes in different unnamed namespaceget same typeid Qi C++ 7 08-07-2011 09:18 PM
Weird issue, same code, same browser, two different apache servers,very different css bluebaron HTML 3 11-04-2009 07:13 PM
running same script on same data on two different machines -->different result Christopher Brewster Python 5 11-14-2008 08:19 PM
Any ideas on different file sizes showing of the same file on two different systems? Joe Computer Support 4 01-10-2005 01:05 AM
same code produces different decimal symbol on different computers with same settings ASP General 2 12-29-2003 02:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57