Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
albanm committed Sep 11, 2014
1 parent 963dcb0 commit 6625be0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If no callback is given the function will run synchronously and return the resul
**Params**

- source `string` | `Document` - The content of the stylesheet as a string or a [libxmljs document](https://github.com/polotek/libxmljs/wiki/Document)
- \[callback\] <code>[parseCallback](#parseCallback)</code> - The callback that handles the response.
- \[callback\] <code>[parseCallback](#parseCallback)</code> - The callback that handles the response. Expects err and Stylesheet object.

**Returns**: `Stylesheet` - Only if no callback is given.
<a name="module_libxslt.parseFile"></a>
Expand All @@ -151,7 +151,7 @@ Parse a XSL stylesheet
**Params**

- sourcePath `stringPath` - The path of the file
- \[callback\] <code>[parseFileCallback](#parseFileCallback)</code> - The callback that handles the response.
- \[callback\] <code>[parseFileCallback](#parseFileCallback)</code> - The callback that handles the response. Expects err and Stylesheet object.

<a name="module_libxslt..Stylesheet"></a>
##class: libxslt~Stylesheet
Expand Down Expand Up @@ -184,8 +184,8 @@ If no callback is given the function will run synchronously and return the resul
**Params**

- source `string` | `Document` - The XML content to apply the stylesheet to given as a string or a [libxmljs document](https://github.com/polotek/libxmljs/wiki/Document)
- \[params\] `object` - Parameters passed to the stylesheet ({@linkhttp://www.w3schools.com/xsl/el_with-param.asp})
- \[callback\] <code>[applyCallback](#Stylesheet..applyCallback)</code> - The callback that handles the response.
- \[params\] `object` - Parameters passed to the stylesheet ([http://www.w3schools.com/xsl/el_with-param.asp](http://www.w3schools.com/xsl/el_with-param.asp))
- \[callback\] <code>[applyCallback](#Stylesheet..applyCallback)</code> - The callback that handles the response. Expects err and result of the same type as the source param passed to apply.

**Returns**: `string` | `Document` - Only if no callback is given. Type is the same as the source param.
<a name="module_libxslt..Stylesheet#applyToFile"></a>
Expand All @@ -195,7 +195,7 @@ Apply a stylesheet to a XML file
**Params**

- sourcePath `string` - The path of the file to read
- \[params\] `object` - Parameters passed to the stylesheet ({@linkhttp://www.w3schools.com/xsl/el_with-param.asp})
- \[callback\] <code>[applyToFileCallback](#Stylesheet..applyToFileCallback)</code> - The callback that handles the response.
- \[params\] `object` - Parameters passed to the stylesheet ([http://www.w3schools.com/xsl/el_with-param.asp](http://www.w3schools.com/xsl/el_with-param.asp))
- \[callback\] <code>[applyToFileCallback](#Stylesheet..applyToFileCallback)</code> - The callback that handles the response. Expects err and result as string.

*documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown)*.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var Stylesheet = function(stylesheetDoc, stylesheetObj){
* If no callback is given the function will run synchronously and return the result or throw an error.
*
* @param {string|Document} source - The content of the stylesheet as a string or a [libxmljs document]{@link https://github.com/polotek/libxmljs/wiki/Document}
* @param {parseCallback} [callback] - The callback that handles the response.
* @param {parseCallback} [callback] - The callback that handles the response. Expects err and Stylesheet object.
* @return {Stylesheet} Only if no callback is given.
*/
exports.parse = function(source, callback) {
Expand Down Expand Up @@ -62,7 +62,7 @@ exports.parse = function(source, callback) {
* Parse a XSL stylesheet
*
* @param {stringPath} sourcePath - The path of the file
* @param {parseFileCallback} [callback] - The callback that handles the response.
* @param {parseFileCallback} [callback] - The callback that handles the response. Expects err and Stylesheet object.
*/
exports.parseFile = function(sourcePath, callback) {
fs.readFile(sourcePath, 'utf8', function(err, data){
Expand All @@ -83,8 +83,8 @@ exports.parseFile = function(sourcePath, callback) {
* If no callback is given the function will run synchronously and return the result or throw an error.
*
* @param {string|Document} source - The XML content to apply the stylesheet to given as a string or a [libxmljs document]{@link https://github.com/polotek/libxmljs/wiki/Document}
* @param {object} [params] - Parameters passed to the stylesheet ({@linkhttp://www.w3schools.com/xsl/el_with-param.asp})
* @param {Stylesheet~applyCallback} [callback] - The callback that handles the response.
* @param {object} [params] - Parameters passed to the stylesheet ({@link http://www.w3schools.com/xsl/el_with-param.asp})
* @param {Stylesheet~applyCallback} [callback] - The callback that handles the response. Expects err and result of the same type as the source param passed to apply.
* @return {string|Document} Only if no callback is given. Type is the same as the source param.
*/
Stylesheet.prototype.apply = function(source, params, callback) {
Expand Down Expand Up @@ -144,8 +144,8 @@ Stylesheet.prototype.apply = function(source, params, callback) {
* Apply a stylesheet to a XML file
*
* @param {string} sourcePath - The path of the file to read
* @param {object} [params] - Parameters passed to the stylesheet ({@linkhttp://www.w3schools.com/xsl/el_with-param.asp})
* @param {Stylesheet~applyToFileCallback} [callback] - The callback that handles the response.
* @param {object} [params] - Parameters passed to the stylesheet ({@link http://www.w3schools.com/xsl/el_with-param.asp})
* @param {Stylesheet~applyToFileCallback} [callback] - The callback that handles the response. Expects err and result as string.
*/
Stylesheet.prototype.applyToFile = function(sourcePath, params, callback) {
var that = this;
Expand Down

0 comments on commit 6625be0

Please sign in to comment.