fontoxpath
fontoxpath copied to clipboard
The query results output is not showing all characters of text
According to this webpage for examples of creating a table in XQuery: the query results are not showing all the text because of three dots instead of all text like <table><tr><td><p>Cell at 1,1</p></td><td><p>Cell at 1,2</p></td><td><…</table> instead of
<table><tr><td><p>Cell at 1,1</p></td><td><p>Cell at 1,2</p></td><td><p>Cell at 1,3</p></td><td><p>Cell at 1,4</p></td><td><p>Cell at 1,5</p></td><td><p>Cell at 1,6</p></td><td><p>Cell at 1,7</p></td><td><p>Cell at 1,8</p></td><td><p>Cell at 1,9</p></td><td><p>Cell at 1,10</p></td></tr>
<tr><td><p>Cell at 2,1</p></td><td><p>Cell at 2,2</p></td><td><p>Cell at 2,3</p></td><td><p>Cell at 2,4</p></td><td><p>Cell at 2,5</p></td><td><p>Cell at 2,6</p></td><td><p>Cell at 2,7</p></td><td><p>Cell at 2,8</p></td><td><p>Cell at 2,9</p></td><td><p>Cell at 2,10</p></td></tr>
<tr><td><p>Cell at 3,1</p></td><td><p>Cell at 3,2</p></td><td><p>Cell at 3,3</p></td><td><p>Cell at 3,4</p></td><td><p>Cell at 3,5</p></td><td><p>Cell at 3,6</p></td><td><p>Cell at 3,7</p></td><td><p>Cell at 3,8</p></td><td><p>Cell at 3,9</p></td><td><p>Cell at 3,10</p></td></tr>
<tr><td><p>Cell at 4,1</p></td><td><p>Cell at 4,2</p></td><td><p>Cell at 4,3</p></td><td><p>Cell at 4,4</p></td><td><p>Cell at 4,5</p></td><td><p>Cell at 4,6</p></td><td><p>Cell at 4,7</p></td><td><p>Cell at 4,8</p></td><td><p>Cell at 4,9</p></td><td><p>Cell at 4,10</p></td></tr>
<tr><td><p>Cell at 5,1</p></td><td><p>Cell at 5,2</p></td><td><p>Cell at 5,3</p></td><td><p>Cell at 5,4</p></td><td><p>Cell at 5,5</p></td><td><p>Cell at 5,6</p></td><td><p>Cell at 5,7</p></td><td><p>Cell at 5,8</p></td><td><p>Cell at 5,9</p></td><td><p>Cell at 5,10</p></td></tr>
<tr><td><p>Cell at 6,1</p></td><td><p>Cell at 6,2</p></td><td><p>Cell at 6,3</p></td><td><p>Cell at 6,4</p></td><td><p>Cell at 6,5</p></td><td><p>Cell at 6,6</p></td><td><p>Cell at 6,7</p></td><td><p>Cell at 6,8</p></td><td><p>Cell at 6,9</p></td><td><p>Cell at 6,10</p></td></tr>
<tr><td><p>Cell at 7,1</p></td><td><p>Cell at 7,2</p></td><td><p>Cell at 7,3</p></td><td><p>Cell at 7,4</p></td><td><p>Cell at 7,5</p></td><td><p>Cell at 7,6</p></td><td><p>Cell at 7,7</p></td><td><p>Cell at 7,8</p></td><td><p>Cell at 7,9</p></td><td><p>Cell at 7,10</p></td></tr>
<tr><td><p>Cell at 8,1</p></td><td><p>Cell at 8,2</p></td><td><p>Cell at 8,3</p></td><td><p>Cell at 8,4</p></td><td><p>Cell at 8,5</p></td><td><p>Cell at 8,6</p></td><td><p>Cell at 8,7</p></td><td><p>Cell at 8,8</p></td><td><p>Cell at 8,9</p></td><td><p>Cell at 8,10</p></td></tr>
<tr><td><p>Cell at 9,1</p></td><td><p>Cell at 9,2</p></td><td><p>Cell at 9,3</p></td><td><p>Cell at 9,4</p></td><td><p>Cell at 9,5</p></td><td><p>Cell at 9,6</p></td><td><p>Cell at 9,7</p></td><td><p>Cell at 9,8</p></td><td><p>Cell at 9,9</p></td><td><p>Cell at 9,10</p></td></tr>
<tr><td><p>Cell at 10,1</p></td><td><p>Cell at 10,2</p></td><td><p>Cell at 10,3</p></td><td><p>Cell at 10,4</p></td><td><p>Cell at 10,5</p></td><td><p>Cell at 10,6</p></td><td><p>Cell at 10,7</p></td><td><p>Cell at 10,8</p></td><td><p>Cell at 10,9</p></td><td><p>Cell at 10,10</p></td></tr></table>
Hello there,
We indeed just show a shortened in the playground when the query results in nodes. This prevents big distracting results from showing up. We intended to make the result just a quick glance of the actual result.
As a workaround, you can use XQuery Update Facility here:
replace node /xml with <table>{
for $i in 1 to xs:int($data?rows)
return
<tr>{
for $j in 1 to xs:int($data?cols) return
<td><p>Cell at {$i},{$j}</p></td>
}</tr>
}</table>
Or you can install FontoXPath and run it from TypeScript/JavaScript. That gives you more control on the return type as well.