Documentation ¶
Overview ¶
Package styledtree is a straightforward default implementation of a styled document tree.
Overview ¶
This is an implementation of style.TreeNode and of cssom.StyledNode. Using a builder type, cssom.Style() will create a styled tree from an HTML parse tree and a CSSOM. The resulting styled tree exposes interface style.TreeNode for every node and may be manipulated via an API.
This is the default implementation used by the engine. However, for interactive use it may be appropriate to create a styled tree derived from another type of styled node. The engine's design should fully support this kind of switch.
BSD License ¶
Copyright (c) 2017–18, Norbert Pillmayer ¶
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of Norbert Pillmayer nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StyNode ¶
type StyNode struct { tree.Node // we build on top of general purpose tree // contains filtered or unexported fields }
StyNode is a style node, the building block of the styled tree.
func (*StyNode) SetStyles ¶
func (sn *StyNode) SetStyles(styles *style.PropertyMap)
SetStyles sets the styling properties of a styled node.
func (StyNode) Styles ¶
func (sn StyNode) Styles() *style.PropertyMap
Styles is part of interface style.Styler.
Directories ¶
Path | Synopsis |
---|---|
Package xpathadapter implements an xpath.NodeNavigator.
|
Package xpathadapter implements an xpath.NodeNavigator. |