Hyperanchor format

In this page, hyperanchor format is described below.

Anchor format overview

Hyperanchor format differs depending on the hyperanchor format version and what is marked up.

In case of selecting and marking up a node directly

In case of selecting and marking up a image or hyperlink directly by using right cilck context menu, below hyperanchor format will be generated.

traditional URL
+ # + hyperanchor format version
+ hyperanchor format path
+ & + hyperanchor format style(*1)

*1 : hyperanchor format style will be generated when style is defined.

In case of selecting and marking up strings

In case of selecting and marking up strings, below hyperanchor format will be generated.

traditional URL
+ # + hyperanchor format version
+ hyperanchor format path for the head of the selection
+ & + hyperanchor format path for the tail of the selection
+ & + hyperanchor format style(*1)

*1 : hyperanchor format style will be generated when style is defined.

Hyperanchor format

Hyperanchor format anchor has below 3 constituents.

  1. "hyperanchor format version" that represents hyperanchor format version.
  2. "hyperanchor format path" that represents positional information of marked up string or node.
  3. "hyperanchor format style" that represents modification style information of marked up string or node.

Hyperanchor format version

item description format example
version hyperanchor format version hyperanchor + version + : hyperanchor1.2:

Hyperanchor format path

Hyperanchor format path is created along with below steps.

step item description format example
1 unique attribute If there is a node that is marked up, previous sibling or ancestor and has "id" or "name" that is unique in the web page as its attribute, describe the node information here. // + tag name + [@ + attribute name + =" + attribute value + "] //DIV[@name="contents"]
2 search method In case that unique attribute exists, describe the method to search node.
* following-sibling : means that marked up string or node exist as a descendant of node that has unique attribute described above.
/ + search method + :: /following-sibling::
3 path Describe the path to the marked up string or node. In case that unique attribute exists, the path is described as a path from the unique attribute. / + tag name + [ + # of same tag name(*1) + ]

repeat untill reaching marked up string or node.
/DIV[3]/P[2]/SPAN[2]
4 character position Describe the start / end character position of marked up string in the node indicated with the path. ( + character position + ) (0)
5 node type Describe the node type of marked up string or node.
  • element node : 1
  • text node : 3
( + node type + ) (3)
6 contents (essential for hyperanchor format ver 1.2) This parameter is used for checking whether the marked up contents is equal to the originally generated contents.
Describe with http and UTF-8 encoded value.
[In case of element node]
Describe node attribute value.
  • e.g.) src attribute value of img tag node
  • e.g.) href attribute value of a tag node.
[In case of text node]
Describe leading 3 characters for the head node path of the selection, trailing 3 characters for the tail node path of the selection.

* In case of not using this item, please describe hyperanchor format version as 1.1.
[element node]
( + attribute name + : + attribute value + )
[text node]
( + html encoded and url encoded contents + )
[element node]
(href%3Ahttp%3A//www ...)
[text node]
(%e5%bd%a2%e5)

*1 : count of same tag name in previous siblings.

Hyperanchor format style

item description format example
style describe style of marked up string / node as css. css style padding-left:16px; background ...

Hyperanchor format output example

http://www.hyper-anchor.org/tutorial/sample.html#hyperanchor1.2://DIV[@id="contents"]/following-sibling::TABLE[1]/TBODY[1]/TR[1]/TD[2](2)(3)(%E3%83%97%E3%83%AB%E6%96%87)&//DIV[@id="contents"]/following-sibling::TABLE[1]/TBODY[1]/TR[1]/TD[2](6)(3)(%E3%83%AB%E6%96%87%E5%AD%97)&background-color:rgb(255,255,153);border:thin%20dotted%20rgb(204,204,204);

* please refer to "Hyperanchor examples" for other patterns.