Skip to content

Commit

Permalink
Fix code block formatting in README
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinPealing authored Oct 10, 2016
1 parent 1d0f5bd commit f81de30
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@ To use in a web page:
- Find the latest release [here](https://github.com/JustinPealing/html-query-plan/releases/latest).
- Include jQuery
- Include `qp.css` and `qp.min.js`
- Call `QP.showPlan`, passing the container in which to show the plan and the query plan XML (as a string).
- Call `QP.showPlan`, passing the container in which to show the plan and the query plan XML (as a string).


<div id="container"></div>
<script>
QP.showPlan(document.getElementById("container"), '<ShowPlanXML...');
</script>
```
<div id="container"></div>
<script>
QP.showPlan(document.getElementById("container"), '<ShowPlanXML...');
</script>
```

See the `examples` folder for comlete examples.

## Running XSLT separately

Under the covers html-query-plan is an XSLT 1.0 stylesheet, `qp.xslt` which can be used to pre-render the plan html. Javascript is still needed to draw the connectling lines, to do this follow the above steps but call `QP.drawLines` instead:

<div id="container">
<!-- Insert XSLT output here -->
</div>
<script>
QP.drawLines(document.getElementById("container"));
</script>
```
<div id="container">
<!-- Insert XSLT output here -->
</div>
<script>
QP.drawLines(document.getElementById("container"));
</script>
```

## Browser Support

Expand Down

0 comments on commit f81de30

Please sign in to comment.