new $k.HTMLDocument()
Methods
(static) fromXslTransformation(sourceDocument, xsltSring)
Transforms the document with a XSLT stylesheet and returns the transformed document as an instance of the constructor
| Name | Type | Description |
|---|---|---|
sourceDocument | XMLDocument | Document to transform |
xsltSring | string | XSLT stylesheet |
If the stylesheet is invalid
asCompleteUrl(relativeURL)
complete relative url to absolute url
| Name | Type | Description |
|---|---|---|
relativeURL | string | The relative url to be completed |
collect(xPath)
collect matching elements
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
If the xpath is invalid
collectJSON(xPath, stringProperties)
collect matching elements
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
stringProperties | array | element tags for elements with full subelements |
If the xpath is invalid
collectXML(xPath)
collect matching elements
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
If the xpath is invalid
completeUrl(xPath, attributeName)
complete relative urls to absolute urls
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
attributeName | string | name of the url-attribute |
If the xpath is invalid
flatten(xPath)
xml-encode all the contents of all matching nodes
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the nodes to flatten |
If the xpath is invalid
getUrl() → {String}
Returns the URL of this DitaDocument
URL string
- Type:
- String
insertAfter(xmlString, xPath)
insert xmlString after each matching element
| Name | Type | Description |
|---|---|---|
xmlString | string | The string representing the element to insert |
xPath | string | The xpath to determine the dita element |
If the xmlString or the xpath is invalid
remove(xPath)
remove matching elements
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
If the xpath is invalid
replace(xPath, replaceFunction)
replace the contents of all matching nodes using the give function
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the nodes to flatten |
replaceFunction | function | The function to determine the replacement |
If the xpath is invalid
setString(string, xPath) → {integer}
Adds the dita url
| Name | Type | Description |
|---|---|---|
string | string | The string to be inserted |
xPath | string | The xpath to determine the element |
If the xpath is invalid
number of modified xml elements/attributes
- Type:
- integer
setUrl(xPath) → {integer}
Adds the dita url
| Name | Type | Description |
|---|---|---|
xPath | string | The xpath to determine the dita element |
If the xpath is invalid
number of modified xml elements/attributes
- Type:
- integer
xmlString()
document string
xslTransform(xsltSring)
Transforms the document with a XSLT stylesheet and returns the transformed document
| Name | Type | Description |
|---|---|---|
xsltSring | string | XSLT stylesheet |
If the stylesheet is invalid