Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: 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/6/2008 5:45:00 PM This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---910079544-987604287-1228585493=:16114 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 5 Dec 2008, Philippe Poulard wrote: > 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. Ah, i see. Thanks for your answer. I will proceed to completely forget about notations and external entities! tom > 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 >> > > > -- Better to die on your feet than live on your knees. -- Emiliano Zapata ---910079544-987604287-1228585493=:16114-- | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
