Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Uses of processing instructions and notations >Thread Next - Re: Uses of processing instructions and notations Re: Uses of processing instructions and notationsTo: NULL Date: 12/5/2008 9:40:00 AM Hi Tom, This is a somewhat deprecated usage inherited from the SGML days. I remember I used such machinery 10 years ago to have documents composed of text and binary contents. This had some sense since tools were supported it (I mean SGML/XML editors), but today, people tend to stick media to their documents à la HTML, with a simple href attribute. Tom Anderson a écrit : > Hi all, > > I can see from the XML spec what processing instructions and notations > are, syntactically. I even just about understand how notations relate to > external entities. But i don't understand what you'd actually use them > for in practice! > > The one example i've found is using an xml-stylesheet PI to specify a > stylesheet. Are there others? > > How about notations and external entities? Is the idea that they're a > mechanism of linkage to external files that's more concrete than just > using a URL? So, if i was writing a bizarro world HTML, i could specify > images like this in the DTD: > > <!NOTATION jpeg SYSTEM "http://some-kind-of-URL"> > <!NOTATION png SYSTEM "http://some-other-kind-of-URL"> > <!ELEMENT img EMPTY> > <!ATTLIST img > src ENTITY > alt CDATA #IMPLIED > > > Then in my document i could write: > > <!DOCTYPE img PUBLIC "-//Bizarro HTML" "http://bizarrohtml" [ > <!ENTITY lena SYSTEM "lena.jpg" NDATA jpg> > ]> > <img src="lena" alt="picture of Lena"/> > > ? > > Can i also use that entity in regular text, like: > > <p>Here is a picture of Lena &lena;</p> > > ? > > And in both cases, what does it *mean*? If i parsed that into DOM and > called getAttribute("src") on the img element, what would i get back? > > What's the point of being able to declare an attribute as being of type > NOTATION? > > And does anyone actually use any of this stuff? > > tom > -- Cordialement, /// (. .) --------ooO--(_)--Ooo-------- | Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX ! | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
