Subject: Re: [xsl] Pointers are weird From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 11 Apr 2025 17:51:34 -0000 |
Thank you Elliotte. Roger, if you want to understand pointers, have a look at C or Assembly language. Indirection, double indirection are a little more clear than XML. regards On Fri, 11 Apr 2025 at 18:42, Elliotte Rusty Harold elharo@xxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > No. XML does not have pointers, any more than it has ints or booleans. > > Elliotte Rusty Harold > elharo@xxxxxxxxxxx > > > On Fri, Apr 11, 2025 at 6:31b/AM Roger L Costello costello@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> Hi Folks, >> >> Occasionally friends come over to my home and I take them on a walk >> around the neighborhood. When I see some thing interesting, I raise my hand >> and position my index finger in the direction of the interesting thing. >> That is, I point at the interesting thing. It seems to me, that that is a >> real pointer--my index finger pointing at some thing. >> >> XML has pointers, e.g., >> >> <Book ref="SK">...</Book> >> >> <Author id="SK">Stephen King</Author> >> >> The value of the ref attribute, "SK", points to <Author id="SK"> >> >> "SK" doesn't look like a pointer to me. It looks like data. XML-aware >> tools, however, treat it as a pointer to the <Author> element with a >> matching id value. >> >> HTML has pointers, e.g., >> >> <a href="#lesson1">...</a> >> >> <p id="lesson1">...</p> >> >> The value of the href attribute, "#lesson1", points to <p id="lesson1"> >> >> "#lesson1" doesn't look like a pointer to me. It looks like data. >> HTML-aware tools, however, treat it as a pointer to the <p> element with a >> matching id value. >> >> I conclude that, in XML and HTML, a pointer is not a pointer at all. It's >> data. It's data that is repeated elsewhere in the document: ("SK" ... >> "SK"), ("#lesson1" ... "lesson1"). For this "pointer fiction" to work, a >> tool that processes the document must participate in the fiction and treat >> ref="SK" as pointing to <Author id="SK"> and treat href="#lesson1" as >> pointing to <p id="lesson1">. >> >> Isn't that weird? >> >> /Roger >> >> >> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2607481> (by > email <>) > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Pointers are weird, Elliotte Rusty Harol | Thread | [xsl] Flatten DITA conrefs, rick@xxxxxxxxxxxxxx |
Re: [xsl] Pointers are weird, Elliotte Rusty Harol | Date | [xsl] Flatten DITA conrefs, rick@xxxxxxxxxxxxxx |
Month |