OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Allowed PEReference usages

[ Lists Home | Date Index | Thread Index ]

Hello,

[Thanks also to Tim Bray who replied earlier :)].

>I don't blame you.  Each time I read the spec, the treatment of PEs seems
>less clear.  I tend to view PEs as they are used in SGML; the XML spec is
>supposed to place further restrictions - that is, I recall the discussions
>while the spec was being developed.

The rules for PEs seem to be scattered throughout the spec making them 
difficult to understand as a whole.  I'm generally unfamiliar with SGML, and 
I was unable to find a spec online.  Where can I find one that discusses the 
PE rules of SGML?

>Your examples all seem to deal with the third rule.

:).  These type of expansions looked to be the most troublesome to parse, 
and I wanted to be thorough in case I received few replies :>.  A look back 
at the XML spec (after reading the highly informative comments of Tim Bray 
and yourself) led me to the rule about adding a following/trailing space to 
PEs that are included outside a literal that would invalidate most of my 
cases.

>| <!ENEITY %pe " ">
>| <!ELEMENT%pe;e ANY>
>
>Permissible in SGML - maintains integral character of relevant parameters.
>Probably okay in XML.

This one (and others you mark as "probably ok") make sense to me as well, 
but is there anywhere we can go to get an authoritative answer?

>Note that the integral token restriction doesn't apply when using PErefs
>to paste together the content of replacement text in what is effectively a
>single parameter in a PE declaration.  (In fact, that is how you might
>"construct" tokens if needed.)

Do you mean like so?

<!ENTITY % begin '<!ENTITY % value "str'>
<!ENTITY % end 'ing">'>
<!ENTITY % all '%begin;%end;'>
%all;

This seems valid to me (as well as all other possible constructions of the 
'all' entity that come from recursively expanding PEs).  Do others agree?  
(I ask not because I'm too lazy to check an arbitrary processor but because 
I want to know what other humans think about the validity of such 
constructions :).)

>| In addition, how does one declare a PE that contains a literal '%'?
>
>Use a character reference in the replacement text.

Ugh.  I should have read appendix D more carefully before asking this (and 
the following question about quotes) first.  Sorry for the trouble.

Again, thanks to both who replied for clearing up the confusion.

-Brett

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS