List of articles   choose language


How to refer to place of document,
which is not marked by author!?



Agreements

tagattributecharacteristicstyle
new html-keywordslinealingpointdefault
values of new html-keywordssideromb
old html-keywordstdidlist
values of old html-keywordscircle
communication xmlsoundsyncpower
values of communication xmlnouser
keyboard and mouser commandenter

Reader's label

Now it's impussible to refer to tag (place of document), which has no attribute name, and no attribute id. I offer to solve this problem. We shall name tag, to which we refer, as label tag. We write hierarchy of label tags in link to document after name of file and marks "#:". We shall name tags, which are between marks "#:" and label tag, as path tags. We shall name path tags and label tag altogether as reader's label. There can be square brackets after path or label tag, we shall name expression in these brackets as specifier. If specifier is a number, then it specifies a serial number of tag at appropriate level of hierarchy.

<a src="./a.htm#:html.body.p[187].em[2]">           text </a>
<a src="./b.htm#:body.h2[5]">                       text </a>
<a src="./c.htm#:html.body.h3[4]+p[12]">            text </a>
<a src="./d.htm#:body.h1[3]+h2[2]+h3[5]+p[8].b[3]"> text </a>

Browser search first tag html in first example, it search first tag body inside it, in which browser search 187-th tag p - reader's label refer to 2-nd tag em inside it.

Browser search first tag body in second example - reader's label refer to 5-th tag h2 inside it.

Mark "plus" between two tags means, that tags are in the same level of hierarchy (i.e. they are enclosed into the same surroundting tag): it's necessary to count number of tag, located right mark "plus", not from beginning of contents of surrounding tag - it's necessary to begin count after tag, located left mark "plus".

Browser search first tag html in third example, it search first tag body inside it, in which browser search 4-th tag h3 - reader's label refer to 12-th tag p after it, enclosed in tag body.

Browser search first tag body in fourth example, then browser continuously searches between tags, located inside it: 3-rd tag h1; 2-nd tag h2 after this h1; 5-th tag h3 after this h2; 8-th tag p after this h3 - reader's label refer to 3-th tag b inside this paragraph.

Both label tag and path tags can be any.

<a src="./a.htm#:html.body.img[14]+p[2]">           text </a>
<a src="./b.htm#:body.div[2].img[5]">               text </a>

If specifier is not a natural number, then path or label tag is searched by not a number - any part of attribute text (if it is not tag img) or whole value of attribute src (if it is tag img) of this tag should coincide with specifier (if there are several such tags, then first of them). Text, enclosed into a tag, is value of its attribute text. Sequence of blanks, tabulation, new lines are considered as one blank both in attribute text, and specifier.

<a src="./a.htm#:html.body.h1[special count]+img[./pic.jpg]"> text </a>
<a src="./b.htm#:dfn[stencil]">                               text </a>



html60author



List of articles   choose language


Используются технологии uCoz