[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Allowed PEReference usages


Re:  Allowed PEReference usages
"Brett Kail" <junkaddr@h...> wrote:

| I'm generally unfamiliar with SGML, and I was unable to find a spec 
| online.  

Sadly, ISO copyright is in the way.  There is this:

 http://crism.maden.org/consulting/pub/sgmldefs.html

but it's missing the text of the standard.

| Where can I find one that discusses the PE rules of SGML?

Offhand I don't know of any, sorry.  You could try the search facility in
the Cover Pages.

|>| <!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?

I'd go with Section 4.4.8 "Included as PE" in the XML spec, especially
this:

: [...] the intent is to constrain the replacement text of parameter
: entities to contain an integral number of grammatical tokens in the DTD

and argue that zero is also an "integral number" :-)

Basically, PEs are a text substitution mechanism, so anything that doesn't
result in invalid text in the appropriate parsing context should be okay.

|> 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;

Yes.  This "works".  As Bob Foster points out, %begin;%end; doesn't.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.