Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: micheee/xqwebdoc
base: 5ef9765e9f
...
head fork: micheee/xqwebdoc
compare: 89d18f56f9
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 16 additions and 11 deletions.
  1. +16 −11 lib/wdoc.xqm
View
27 lib/wdoc.xqm
@@ -197,19 +197,24 @@ declare function wdoc:dd($node as element()){
return switch($name)
case "Trim" return <br />
case "Char" return $node/text()
- case "DirElemConstructor" return element {$node/Tag[1]/string()}
- {
- $node/DirAttrConstructor !
- attribute {./Tag/text()}
- {string-join(./DirAttributeValue/QuotAttrContentChar/text())}, fn:parse-xml("<span>"||string-join($node/ElementContentChar/text())||"</span>"),
- if($node/DirElemConstructor) then
- $node/DirElemConstructor ! (" ", wdoc:dd(.))
- else ()
-
- }
+ case "DirElemConstructor" return
+ element {$node/Tag[1]/string()}
+ {
+ (: add direct attributes to the element :)
+ $node/DirAttrConstructor !
+ attribute {./Tag/text()}
+ {string-join(./DirAttributeValue/QuotAttrContentChar/text())},
+
+ (: add contents to the element :)
+ fn:parse-xml("<span>"||string-join($node/ElementContentChar/text())||"</span>"),
+
+ (: add nested elements to the parent element:)
+ if($node/DirElemConstructor) then
+ $node/DirElemConstructor ! (" ", wdoc:dd(.))
+ else ()
+ }
default return ""
- (: $node[name(.) != "Trim"]/text() :)
};
(:~
: This function checks if a given method is annotated with restxq

No commit comments for this range

Something went wrong with that request. Please try again.