LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Re: 5 questions
From: Ronald Bourret <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Mon, 30 Nov 1998 10:24:03 +0100
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (150 lines)


John E. Simpson wrote:
> > Ronald Bourret wrote:
> >
> >(As a nitpicky aside, referencing the BTW entity in the value attribute
> >value as John does would cause a validation error: an ENTITY attribute's
> >value must match the Nmtoken production, which "By the way" does not.
 And
> >even if the entity's value had no spaces (e.g. Bytheway), there would
still
> >be a validity error because no unparsed entity was declared.)
>
> Re: the "nitpicky" but well-taken aside, in the portion of the annotated
> spec that I referenced (follow the Notes link in the bottom right-hand
> frame, then the link to Entity References in Attribute Values), Tim uses
> this example:
>
>         <x href='&spec;id(sec-starttags)'>
>
> The &spec; entity is defined as a URI. URIs may but commonly don't match
> the Nmtokens production either, right?

URIs commonly don't match Nmtoken/Nmtokens because slash (/) is not
allowed.  However, that doesn't matter in this case.  An attribute value
needs to match Nmtoken/Nmtokens only if its type is (NMTOKEN, ENTITY,
enumeration) / (NMTOKENS / ENTITIES), so although we don't know the type of
the attribute above, it's a good bet that it's a CDATA attribute.  (That's
why the aside was nitpicky.  You stated that you could reference a general
entity in an attribute value.  I agreed, but then went on to be nitpicky
and pointed out that, because the attribute type was ENTITY (a red herring
wrt your point) you would get a validation error.)

> The Big Entity Processing Table in the spec (in the section 4.4 that you
> referenced) apparently makes a distinction between an entity reference
> occurring as the entire value of an attribute ("[Entity] Occurs as
> Attribute Value"), vs. as a piece of the value ("[Entity] Reference in
> Attribute Value") -- am I reading this right? Internal general entities
are
> indeed forbidden in the former case, but "included in literal" in the
> latter. Why would such a distinction be important? (Not arguing a point,
> just wondering about it.)

You are reading it correctly.  Here is an example of an entity occurring
*as* an attribute value:

   ...
   <!-- foo is an unparsed entity matching the bar notation -->
   <!ENTITY foo SYSTEM "http://foo" NDATA bar >
   ...
   <!-- The value of MyAttr is the entity "foo" -->
   <MyElement MyAttr="foo">

Here is an example of an entity occurring *in* an attribute value:

   ...
   <!-- foo is a parsed general entity -->
   <!ENTITY foo "bar">\
   ...
   <!-- The value of MyAttr is "bar" -->
   <MyElement MyAttr="&foo;">

In the first case, the value of the attribute is the unparsed entity foo;
the processor must pass the name of this entity, along with the system and
public (if any) ids and the notation information, to the application.  In
the second case, the entity is dereferenced and its value becomes part of
the attribute value.  ("Included in literal" refers to the resulting
literal formed when one entity is used in the definition of another in the
DTD.  See the first example in 4.4.5 and remember that "&YN;" is a typo and
should be "%YN;".)

It's probably worth your time to spend a leisurely afternoon or two with
sections 4.4 and 4.5 and work it all out yourself.  All the information is
there, and the table sums it up nicely, but it takes a day or so to go
through all the possibilities and really understand it.

-- Ron Bourret

begin 600 WINMAIL.DAT
M>)\^(@0)`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$(@ <`
M& ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`````@`"``$$
MD 8`9 $```$````,`````P``, (````+``\.``````(!_P\!````9P``````
M``"!*Q^DOJ,0&9UN`-T!#U0"`````$=E;F5R86P@9&ES8W5S<VEO;B!O9B!%
M>'1E;G-I8FQE($UA<FMU<"!,86YG=6%G90!33510`%A-3"U,0$Q)4U1315)6
M+DA%04Y%5"Y)10``'@`", $````%````4TU44 `````>``,P`0```!D```!8
M34PM3$!,25-44T525BY(14%.150N244``````P`5# $````#`/X/!@```!X`
M`3 !````,P```"='96YE<F%L(&1I<V-U<W-I;VX@;V8@17AT96YS:6)L92!-
M87)K=7 @3&%N9W5A9V4G```"`0LP`0```!X```!33510.EA-3"U,0$Q)4U13
M15)6+DA%04Y%5"Y)10````,``#D`````"P! .@$````"`?8/`0````0`````
M```"MD@!!( !`! ```!213H@-2!Q=65S=&EO;G,`,04!!8 #``X```#.!PL`
M'@`*`!@``P`!`"0!`2" `P`.````S@<+`!X`"0`S``P``0!'`0$)@ $`(0``
M`#@Y0S@U-T5$,S X.$0R,3%"039$,# T,#DU,#-$,#0S`/D&`0.0!@`8"@``
M% ````L`(P```````P`F```````+`"D```````,`+@```````P`V``````!
M`#D`T#>%*T,<O@$>`' ``0```! ```!213H@-2!Q=65S=&EO;G,``@%Q``$`
M```6`````;X<0RN#[5?(BH@P$=*Z;0! E0/00P``'@`># $````%````4TU4
M4 `````>`!\,`0```!T```!R8F]U<G)E=$!I=&\N='4M9&%R;7-T861T+F1E
M``````,`!A!4T$AV`P`'$#X*```>``@0`0```&4```!*3TA.15-)35!33TY7
M4D]413I23TY!3$1"3U524D545U)/5$4Z*$%304Y)5%!)0TM905-)1$4L4D5&
M15)%3D-)3D=42$5"5%=%3E1)5%E)3E1(159!3%5%05144DE"551%5D%,````
M``(!"1 !````B@@``(8(``!$$@``3%I&=>7!$-W_``H!#P(5`J0#Y 7K`H,`
M4!,#5 (`8V@*P'-E=.XR!@`&PP*#,@/&!Q,"@\8S`\4"`'!R<1(@$X@B- ]Z
M:&5L`R!$;,IG`H,U$P]F-A0\!K#0<W1E;0* ?0J ",\?"=D"@ J!#;$+8&YG
M,3PP,Q0@"PH4(@'0($ID;V@#H$4N!@`'<'"R<P(@('<[log in to unmask]@J/MPN1$O(=
M\3XA(0@`;@= ^&0@0@AA&M %0!\K(3%)(L@H000@82 #`'3@<&EC:WDD, "0
M#;"T+" :T&8$D GP8PN &&<@=!: (=!45R"]"?!T)' DT N )A-V!T#/"E D
M, ) !1!B=1F@(LBG)X4$(!XC9&\'D7<(8/$AL6-A=1'P)#$G@240G2?@:1[Q
M!) #8'(Z)#!!'E%.5$E462?8)[IS*'YM*L %0 # =!&P02833FUT;VL)\" S
M%, $<'5C*X(E0'=H,R2@+R B0B30)B)W871Y(BGD;A] 'H 3<&[R9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#)Q4QM ^WGJQB<1H('<+C62<QK0`=!M.,#N@/-)8_GP64[Z
M0/"4?C&"0<^2D78`*E,XP2(E&G*:/OY)A?(P`>)0GH#)8D3 +R#_EW,FP '1
M4;%)$9*1)$!8<._*8"(`0R DT6:\XO/ 10'_&>$J0 -4H 6'8*""DH(8]C\>
[log in to unmask],Y=R*M!L9O\R<B11%J(&^>65D" "X07U-V"PGH+)X&U2X9CP=7#_
MBE$UP&J@D&34D4-BI>-IT?\YT8(Q4;&&4!:1.<""LB1"_T1DG@'"(,3AOB,9
M0W;AYF!_.K#0L6!A#!/O9CYENP%2K0;!0I>!D"!T/F5]/F "`#$P```#`! 0
M``````,`$1 `````0 `', "M-)4^'+X!0 `(, "M-)4^'+X!'@`]``$````%
5````4D4Z( `````#``TT_3<``&:Z
`
end

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager