Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Uses of processing instructions and notations

From: Tom Anderson <twic@------.-----.-->
To: NULL
Date: 12/4/2008 7:46:00 PM
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

-- 
I'm angry, but not Milk and Cheese angry. -- Mike Froggatt


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent