Changeset 3046647
- Timestamp:
- 03/07/2024 01:07:17 AM (2 years ago)
- Location:
- tenandtwo-xslt-processor/trunk
- Files:
-
- 5 edited
-
changelog.txt (modified) (2 diffs)
-
includes/cli.php (modified) (9 diffs)
-
readme.md (modified) (11 diffs)
-
readme.txt (modified) (12 diffs)
-
tenandtwo-xslt-processor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tenandtwo-xslt-processor/trunk/changelog.txt
r3046386 r3046647 4 4 5 5 6 ## [1.0.1] - 2024-03-07 6 ## [1.0.2] - 2024-03-06 7 ## [1.0.1] - 2024-03-06 7 8 8 9 ### Changed … … 10 11 - readme.md 11 12 - readme.txt 13 - includes/cli.php : finalize transform_xml(), select_xml(), select_csv() 12 14 13 15 -
tenandtwo-xslt-processor/trunk/includes/cli.php
r3045975 r3046647 35 35 * --xsl='{file|url|id|slug}' 36 36 * --xml='{file|url|id|slug}' 37 * --cache= {minutes, if xsl|xml={url}}37 * --cache='{minutes, if xsl|xml={url}}' 38 38 * --tidy='{yes|html}' or tidy or --tidy='xml' 39 39 * --{myparam}='{myvalue}' … … 44 44 * 45 45 * wp --allow-root xslt transform_xml --xsl='sample-xsl' --xml='sample-xml' --testparam='HERE' --outfile='__WP_CONTENT_DIR__/uploads/cli-outfile.txt' 46 * wp --allow-root xslt transform_xml --xsl='sample-xsl' --xml='sample-xml' --testparam='HERE' > ./cli-outfile.txt 46 47 * 47 48 * @when after_wp_load 48 49 */ 49 function transform_xml( $args, $assoc_args ) {50 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); }50 public function transform_xml( $args, $assoc_args ) { 51 //if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); } 51 52 52 53 if (in_array('tidy',$args)) { $assoc_args['tidy'] = 'yes'; } … … 56 57 $content = $assoc_args['content'] ?? ''; 57 58 $result = XSLT_Processor_Shortcode::xslt_transform_xml( $attrs, $content ); 59 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('attrs','content','result'),true), E_USER_NOTICE); } 58 60 59 WP_CLI::success('');60 if (WP_DEBUG) { WP_CLI::line( __METHOD__.' : '.print_r($attrs,true) ); }61 61 WP_CLI::line( print_r($result,true) ); 62 62 } … … 70 70 * wp xslt select_xml 71 71 * --xml='{file|url|id|slug}' 72 * --cache= {minutes, if xml={url}}72 * --cache='{minutes, if xml={url}}' 73 73 * --select='{xpath}' 74 74 * --root='{nodename|empty}' 75 75 * 76 * --tidy= yes|html or tidy or --tidy=xml77 * --strip-namespaces= yesor strip-namespaces78 * --strip-declaration= yes|no76 * --tidy='{yes|html}' or tidy or --tidy='xml' 77 * --strip-namespaces='{no|yes}' or strip-namespaces 78 * --strip-declaration='{yes|no}' 79 79 * 80 80 * --format='{xml|json}' 81 * --htmlentities= yesor htmlentities81 * --htmlentities='yes' or htmlentities 82 82 * 83 83 * ## EXAMPLES 84 84 * 85 85 * wp --allow-root xslt select_xml --xml='sample-xml' --select='//list' 86 * wp --allow-root xslt select_xml --xml='sample-xml' --select='//list' > ./cli-outfile.txt 86 87 * 87 88 * @when after_wp_load 88 89 */ 89 function select_xml( $args, $assoc_args ) {90 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); }90 public function select_xml( $args, $assoc_args ) { 91 //if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); } 91 92 92 93 if (in_array('strip-namespaces',$args)) { $assoc_args['strip-namespaces'] = 'yes'; } … … 97 98 $content = $assoc_args['content'] ?? ''; 98 99 $result = XSLT_Processor_Shortcode::xslt_select_xml( $attrs, $content ); 100 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('attrs','content','result'),true), E_USER_NOTICE); } 99 101 100 WP_CLI::success('');101 if (WP_DEBUG) { WP_CLI::line( __METHOD__.' : '.print_r($attrs,true) ); }102 102 WP_CLI::line( print_r($result,true) ); 103 103 } … … 111 111 * wp xslt select_csv 112 112 * --csv='{file|url}' 113 * --cache= {minutes, if csv={url}}113 * --cache='{minutes, if csv={url}}' 114 114 * 115 * --separator= ","116 * --enclosure= "\""117 * --escape= "\\"115 * --separator=',' 116 * --enclosure='\"' 117 * --escape='\\' 118 118 * 119 * --key_row= "{row number for column labels}"120 * --col= "{return column number(s), letter(s), or label(s)}"121 * --key_col= "{col number, letter, or label for key matching}"122 * --key= "{value(s) for key_col matching}"123 * --row= "{return row number(s)}"124 * --class= "{css classname(s) for result <table>}"119 * --key_row='{row number for column labels}' 120 * --col='{return column number(s), letter(s), or label(s)}' 121 * --key_col='{col number, letter, or label for key matching}' 122 * --key='{value(s) for key_col matching}' 123 * --row='{return row number(s)}' 124 * --class='{css classname(s) for result <table>}' 125 125 * 126 * --htmlentities= yesor htmlentities126 * --htmlentities='yes' or htmlentities 127 127 * 128 128 * ## EXAMPLES … … 130 130 * wp --allow-root xslt select_csv --csv='case-study-gsheets/Sheet1.csv' 131 131 * wp --allow-root xslt select_csv --csv="case-study-gsheets/Sheet1.csv" --row="1" --key_row="1" --key_col="ID" --key="1004,1005" 132 * wp --allow-root xslt transform_xml --xsl='csv-pivot-xsl' --key_row='1' --content='[xslt_select_csv csv="case-study-gsheets/Sheet1.csv" row="1" key_row="1" key_col="ID" key="1004,1005" /]' 132 133 * 133 * wp --allow-root xslt transform_xml --xsl='csv-pivot-xsl' --key_row='1' --content='[xslt_select_csv csv="case-study-gsheets/Sheet1.csv" row="1" key_row="1" key_col="ID" key="1004,1005" /]' *134 134 * @when after_wp_load 135 135 */ 136 function select_csv( $args, $assoc_args ) {137 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); }136 public function select_csv( $args, $assoc_args ) { 137 //if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('args','assoc_args'),true), E_USER_NOTICE); } 138 138 139 139 if (in_array('htmlentities',$args)) { $assoc_args['htmlentities'] = 'yes'; } … … 142 142 $content = $assoc_args['content'] ?? ''; 143 143 $result = XSLT_Processor_Shortcode::xslt_select_csv( $attrs, $content ); 144 if (WP_DEBUG) { trigger_error(__METHOD__." : ".print_r(compact('attrs','content','result'),true), E_USER_NOTICE); } 144 145 145 WP_CLI::success('');146 if (WP_DEBUG) { WP_CLI::line( __METHOD__.' : '.print_r($attrs,true) ); }147 146 WP_CLI::line( print_r($result,true) ); 148 147 } … … 150 149 151 150 } // end class XSLT_Processor_CLI 152 153 154 155 /**156 * ## OPTIONS157 *158 * [--xsl=<xsl>]159 * : xsl stylesheet160 * ---161 * default: default.xsl162 * ---163 *164 * [--xml=<xml>]165 * : xml document166 * ---167 * default: default.xml168 * ---169 */ -
tenandtwo-xslt-processor/trunk/readme.md
r3046386 r3046647 7 7 **Tested up to:** 6.4 8 8 **Requires PHP:** 7.4 9 **Stable tag:** 1.0. 19 **Stable tag:** 1.0.2 10 10 **License:** GPLv2 or later 11 11 **License URI:** https://www.gnu.org/licenses/gpl-2.0.html … … 19 19 ## Description 20 20 21 The Ten&Two XSLT Processor plugin brings the power of PHP's [XSL extension](https://www.php.net/manual/en/book.xsl.php) to Wordpress. Once enabled, the plugin creates three (3) shortcodes - **`[xslt_transform /]`**, **`[xslt_select_xml/]`**, **`[xslt_select_csv/]`** - which can be used separately or in tandem to enrich your site with content from XML and CSV sources. The plugin also enables twocustom post types - **`XSL Stylesheets`** and **`XML Documents`** - for managing and validating sources within WP Admin.21 The Ten&Two XSLT Processor plugin brings the power of PHP's [XSL extension](https://www.php.net/manual/en/book.xsl.php) to Wordpress. Once enabled, the plugin creates three (3) shortcodes - **`[xslt_transform_xml/]`**, **`[xslt_select_xml/]`**, and **`[xslt_select_csv/]`** - which can be used separately or in tandem to enrich your site with content from XML and CSV sources. The plugin also enables two (2) custom post types - **`XSL Stylesheets`** and **`XML Documents`** - for managing and validating sources within WP Admin. 22 22 23 23 Detailed documentation and sample code can be found at [https://xsltproc.tenandtwo.com/](https://xsltproc.tenandtwo.com/) … … 29 29 30 30 31 ### Shortcode : `[xslt_transform /]`32 33 `[xslt_transform /]` is the plugin's primary function. This shortcode processes XML data using an XSL stylesheet, and then outputs the result as HTML, more XML, or as simple TEXT.34 35 - **`[xslt_transform xsl="{file|url|id|slug}" xml="{file|url|id|slug}" /]`**36 - **`[xslt_transform xsl="{file|url|id|slug}"]<DATA>...</DATA>[/xslt_transform]`**31 ### Shortcode : `[xslt_transform_xml/]` 32 33 `[xslt_transform_xml/]` is the plugin's primary function. This shortcode processes XML data using an XSL stylesheet, and then outputs the result as HTML, more XML, or as simple TEXT. 34 35 - **`[xslt_transform_xml xsl="{file|url|id|slug}" xml="{file|url|id|slug}" /]`** 36 - **`[xslt_transform_xml xsl="{file|url|id|slug}"]<DATA>...</DATA>[/xslt_transform_xml]`** 37 37 38 38 If either the `xsl` or `xml` parameter is left unspecified, defaults are used. The default XML value is `<NODATA/>`. The default XSL stylesheet prints all of the incoming data as HTML. If extra attributes are specified in the shortcode - eg, `mykey="myval"` - those keys/values are passed along as parameters to the stylesheet - `<xsl:param name="mykey"/>`. … … 41 41 ### Shortcode : `[xslt_select_xml/]` 42 42 43 `[xslt_select_xml/]` is a helper function. It reads XML and returns a selection of the data, based on a supplied XPath expression. There are two options for specifying the XPath. First, using the `select` attribute or, second, using the body of the shortcode. Complex select statements with quotes, square brackets or other special syntax, should use the second pattern :43 `[xslt_select_xml/]` is a helper function. It reads XML and returns a selection of the data, based on a supplied XPath expression. There are two (2) options for specifying the XPath. First, using the `select` attribute or, second, using the body of the shortcode. Complex select statements with quotes, square brackets or other special syntax, should use the second pattern : 44 44 45 45 - **`[xslt_select_xml xml="{file|url|id|slug}" select="{XPath}" /]`** … … 51 51 ### Shortcode : `[xslt_select_csv/]` 52 52 53 `[xslt_select_csv/]` is a helper function for converting CSV file data to XML. The result can be output directly as an HTML `<table>`, or the result can be passed to `[xslt_transform /]` for further processing.53 `[xslt_select_csv/]` is a helper function for converting CSV file data to XML. The result can be output directly as an HTML `<table>`, or the result can be passed to `[xslt_transform_xml/]` for further processing. 54 54 55 55 - **`[xslt_select_csv csv="{file|url}" /]`** … … 72 72 ### Nested Shortcodes 73 73 74 Combine `[xslt_transform ]` with `[xslt_select_xml]` :75 76 - **`[xslt_transform ][xslt_select_xml/][/xslt_transform]`**77 78 Combine `[xslt_transform ]` with `[xslt_select_csv]` :79 80 - **`[xslt_transform ][xslt_select_csv/][/xslt_transform]`**81 82 Combine `[xslt_transform ]` with itself using `[/xslt_transform_alias]` (WP does not support nested shortcodes with identical names) :83 84 - **`[xslt_transform_alias][xslt_transform /][/xslt_transform_alias]`**74 Combine `[xslt_transform_xml]` with `[xslt_select_xml]` : 75 76 - **`[xslt_transform_xml][xslt_select_xml/][/xslt_transform_xml]`** 77 78 Combine `[xslt_transform_xml]` with `[xslt_select_csv]` : 79 80 - **`[xslt_transform_xml][xslt_select_csv/][/xslt_transform_xml]`** 81 82 Combine `[xslt_transform_xml]` with itself using `[/xslt_transform_alias]` (WP does not support nested shortcodes with identical names) : 83 84 - **`[xslt_transform_alias][xslt_transform_xml/][/xslt_transform_alias]`** 85 85 86 86 Combine multiple shortcodes/sources to create a single `XML Document` (see Custom Post Types above) : … … 93 93 When a shortcode specifies a remote file - `xml="{url}"` or `csv="{url}"` - that source is cached locally using WP Transients. The default cache duration is set in the XSLT Processor Settings. To override the default, add `cache="{minutes}"` to the shortcode. 94 94 95 - **`[xslt_transform xml="{url}" cache="{minutes}" /]`**95 - **`[xslt_transform_xml xml="{url}" cache="{minutes}" /]`** 96 96 - **`[xslt_select_xml xml="{url}" cache="{minutes}" /]`** 97 97 - **`[xslt_select_csv csv="{url}" cache="{minutes}" /]`** … … 100 100 ### Namespace Parameters 101 101 102 Within `[xslt_select_xml/]` the plugin provides two methods for handling XML containing namespaces. The first is to add `strip-namespaces` to the shortcode. The second method is to add the needed prefixes and namespace URIs using `xslns`.102 Within `[xslt_select_xml/]` the plugin provides two (2) methods for handling XML containing namespaces. The first is to add `strip-namespaces` to the shortcode. The second method is to add the needed prefixes and namespace URIs using `xslns`. 103 103 104 104 - **`[xslt_select_xml xml="{file}" strip-namespaces="yes" select="//node" /]`** 105 105 - **`[xslt_select_xml xml="{file}" xmlns="ns1" ns1="{namespace-uri-1}" select="//ns1:node" /]`** 106 106 - **`[xslt_select_xml xml="{file}" xmlns="ns1 ns2" ns1="{namespace-uri-1}" ns2="{namespace-uri-2}" select="//ns1:node/ns2:node" /]`** 107 108 109 ### WP-CLI 110 111 All three (3) shortcodes have command-line equivalents. They can be used, for instance, to run quick tests. Or they can be used, by piping the outputs into files, to pre-generate results. 112 113 * wp xslt transform_xml 114 --xsl='{file|url|id|slug}' 115 --xml='{file|url|id|slug}' 116 --cache='{minutes, if xsl|xml={url}}' 117 --tidy='{yes|html}' or tidy or --tidy='xml' 118 --{myparam}='{myvalue}' 119 --outfile='{filepath}' 120 --htmlentities='yes' or htmlentities 121 122 * wp xslt select_xml 123 --xml='{file|url|id|slug}' 124 --cache='{minutes, if xml={url}}' 125 --select='{xpath}' 126 --root='{nodename|empty}' 127 --tidy='{yes|html}' or tidy or --tidy='xml' 128 --strip-namespaces='yes' or strip-namespaces 129 --strip-declaration='no' 130 --format='{xml|json}' 131 --htmlentities='yes' or htmlentities 132 133 * wp xslt select_csv 134 --csv='{file|url}' 135 --cache='{minutes, if csv={url}}' 136 --separator=',' 137 --enclosure='\"' 138 --escape='\\' 139 --key_row='{row number for column labels}' 140 --col='{return column number(s), letter(s), or label(s)}' 141 --key_col='{col number, letter, or label for key matching}' 142 --key='{value(s) for key_col matching}' 143 --row='{return row number(s)}' 144 --class='{css classname(s) for result <table>}' 145 --htmlentities='yes' or htmlentities 107 146 108 147 … … 157 196 ## Frequently Asked Questions 158 197 198 - - - 199 159 200 ### Where are the plugin options? 160 201 … … 166 207 - **Local File Search Paths** 167 208 209 - - - 168 210 169 211 ### Where is the documentation? … … 178 220 - [How To](https://xsltproc.tenandtwo.com/xslt-processor/how-to) 179 221 222 - - - -
tenandtwo-xslt-processor/trunk/readme.txt
r3046406 r3046647 6 6 Tested up to: 6.4 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 16 16 == Description == 17 17 18 The Ten&Two XSLT Processor plugin brings the power of PHP's XSL extension to Wordpress. Once enabled, the plugin creates three (3) shortcodes - `[xslt_transform /]`, `[xslt_select_xml/]`, and `[xslt_select_csv/]` - which can be used separately or in tandem to enrich your site with content from XML and CSV sources. The plugin also enables twocustom post types - `XSL Stylesheets` and `XML Documents` - for managing and validating sources within WP Admin.18 The Ten&Two XSLT Processor plugin brings the power of PHP's XSL extension to Wordpress. Once enabled, the plugin creates three (3) shortcodes - `[xslt_transform_xml/]`, `[xslt_select_xml/]`, and `[xslt_select_csv/]` - which can be used separately or in tandem to enrich your site with content from XML and CSV sources. The plugin also enables two (2) custom post types - `XSL Stylesheets` and `XML Documents` - for managing and validating sources within WP Admin. 19 19 20 20 Detailed documentation and sample code can be found at https://xsltproc.tenandtwo.com/ … … 26 26 27 27 28 = Shortcode : [xslt_transform /] =29 30 [xslt_transform /] is the plugin's primary function. This shortcode processes XML data using an XSL stylesheet, and then outputs the result as HTML, more XML, or as simple TEXT.31 32 - `[xslt_transform xsl="{file|url|id|slug}" xml="{file|url|id|slug}" /]`33 - `[xslt_transform xsl="{file|url|id|slug}"]<DATA>...</DATA>[/xslt_transform]`28 = Shortcode : [xslt_transform_xml/] = 29 30 [xslt_transform_xml/] is the plugin's primary function. This shortcode processes XML data using an XSL stylesheet, and then outputs the result as HTML, more XML, or as simple TEXT. 31 32 - `[xslt_transform_xml xsl="{file|url|id|slug}" xml="{file|url|id|slug}" /]` 33 - `[xslt_transform_xml xsl="{file|url|id|slug}"]<DATA>...</DATA>[/xslt_transform_xml]` 34 34 35 35 If either the `xsl` or `xml` parameter is left unspecified, defaults are used. The default XML value is `<NODATA/>`. The default XSL stylesheet prints all of the incoming data as HTML. If extra attributes are specified in the shortcode - eg, `mykey="myval"` - those keys/values are passed along as parameters to the stylesheet - `<xsl:param name="mykey"/>`. … … 38 38 = Shortcode : [xslt_select_xml/] = 39 39 40 [xslt_select_xml/] is a helper function. It reads XML and returns a selection of the data, based on a supplied XPath expression. There are two options for specifying the XPath. First, using the `select` attribute or, second, using the body of the shortcode. Complex select statements with quotes, square brackets or other special syntax, should use the second pattern :40 [xslt_select_xml/] is a helper function. It reads XML and returns a selection of the data, based on a supplied XPath expression. There are two (2) options for specifying the XPath. First, using the `select` attribute or, second, using the body of the shortcode. Complex select statements with quotes, square brackets or other special syntax, should use the second pattern : 41 41 42 42 - `[xslt_select_xml xml="{file|url|id|slug}" select="{XPath}" /]` … … 48 48 = Shortcode : [xslt_select_csv/] = 49 49 50 [xslt_select_csv/] is a helper function for converting CSV file data to XML. The result can be output directly as an HTML `<table>`, or the result can be passed to `[xslt_transform /]` for further processing.50 [xslt_select_csv/] is a helper function for converting CSV file data to XML. The result can be output directly as an HTML `<table>`, or the result can be passed to `[xslt_transform_xml/]` for further processing. 51 51 52 52 - `[xslt_select_csv csv="{file|url}" /]` … … 69 69 = Nested Shortcodes = 70 70 71 Combine `[xslt_transform ]` with `[xslt_select_xml]` :72 73 - `[xslt_transform ][xslt_select_xml/][/xslt_transform]`74 75 Combine `[xslt_transform ]` with `[xslt_select_csv]` :76 77 - `[xslt_transform ][xslt_select_csv/][/xslt_transform]`78 79 Combine `[xslt_transform ]` with itself using `[/xslt_transform_alias]` (WP does not support nested shortcodes with identical names) :80 81 - `[xslt_transform_alias][xslt_transform /][/xslt_transform_alias]`71 Combine `[xslt_transform_xml]` with `[xslt_select_xml]` : 72 73 - `[xslt_transform_xml][xslt_select_xml/][/xslt_transform_xml]` 74 75 Combine `[xslt_transform_xml]` with `[xslt_select_csv]` : 76 77 - `[xslt_transform_xml][xslt_select_csv/][/xslt_transform_xml]` 78 79 Combine `[xslt_transform_xml]` with itself using `[/xslt_transform_alias]` (WP does not support nested shortcodes with identical names) : 80 81 - `[xslt_transform_alias][xslt_transform_xml/][/xslt_transform_alias]` 82 82 83 83 Combine multiple shortcodes/sources to create a single `XML Document` (see Custom Post Types above) : … … 90 90 When a shortcode specifies a remote file - `xml="{url}"` or `csv="{url}"` - that source is cached locally using WP Transients. The default cache duration is set in the XSLT Processor Settings. To override the default, add `cache="{minutes}"` to the shortcode. 91 91 92 - `[xslt_transform xml="{url}" cache="{minutes}" /]`92 - `[xslt_transform_xml xml="{url}" cache="{minutes}" /]` 93 93 - `[xslt_select_xml xml="{url}" cache="{minutes}" /]` 94 94 - `[xslt_select_csv csv="{url}" cache="{minutes}" /]` … … 97 97 = Namespace Parameters = 98 98 99 Within `[xslt_select_xml/]` the plugin provides two methods for handling XML containing namespaces. The first is to add `strip-namespaces` to the shortcode. The second method is to add the needed prefixes and namespace URIs using `xslns`.99 Within `[xslt_select_xml/]` the plugin provides two (2) methods for handling XML containing namespaces. The first is to add `strip-namespaces` to the shortcode. The second method is to add the needed prefixes and namespace URIs using `xslns`. 100 100 101 101 - `[xslt_select_xml xml="{file}" strip-namespaces="yes" select="//node" /]` 102 102 - `[xslt_select_xml xml="{file}" xmlns="ns1" ns1="{namespace-uri-1}" select="//ns1:node" /]` 103 103 - `[xslt_select_xml xml="{file}" xmlns="ns1 ns2" ns1="{namespace-uri-1}" ns2="{namespace-uri-2}" select="//ns1:node/ns2:node" /]` 104 105 106 = WP-CLI = 107 108 All three (3) shortcodes have command-line equivalents. They can be used, for instance, to run quick tests. Or they can be used, by piping the outputs into files, to pre-generate results. 109 110 * wp xslt transform_xml 111 --xsl='{file|url|id|slug}' 112 --xml='{file|url|id|slug}' 113 --cache='{minutes, if xsl|xml={url}}' 114 --tidy='{yes|html}' or tidy or --tidy='xml' 115 --{myparam}='{myvalue}' 116 --outfile='{filepath}' 117 --htmlentities='yes' or htmlentities 118 119 * wp xslt select_xml 120 --xml='{file|url|id|slug}' 121 --cache='{minutes, if xml={url}}' 122 --select='{xpath}' 123 --root='{nodename|empty}' 124 --tidy='{yes|html}' or tidy or --tidy='xml' 125 --strip-namespaces='yes' or strip-namespaces 126 --strip-declaration='no' 127 --format='{xml|json}' 128 --htmlentities='yes' or htmlentities 129 130 * wp xslt select_csv 131 --csv='{file|url}' 132 --cache='{minutes, if csv={url}}' 133 --separator=',' 134 --enclosure='\"' 135 --escape='\\' 136 --key_row='{row number for column labels}' 137 --col='{return column number(s), letter(s), or label(s)}' 138 --key_col='{col number, letter, or label for key matching}' 139 --key='{value(s) for key_col matching}' 140 --row='{return row number(s)}' 141 --class='{css classname(s) for result <table>}' 142 --htmlentities='yes' or htmlentities 104 143 105 144 … … 154 193 == Frequently Asked Questions == 155 194 195 - - - 196 156 197 = Where are the plugin options? = 157 198 … … 163 204 - Local File Search Paths 164 205 206 - - - 165 207 166 208 = Where is the documentation? = … … 175 217 - How To : https://xsltproc.tenandtwo.com/xslt-processor/how-to 176 218 219 - - - 177 220 178 221 == Screenshots == … … 183 226 == Changelog == 184 227 185 = 1.0.1 = 186 * Update readme files 187 188 = 1.0.0 = 228 = 1.0.x = 189 229 * Initial Release 230 * Add WP-CLI commands -
tenandtwo-xslt-processor/trunk/tenandtwo-xslt-processor.php
r3046386 r3046647 13 13 * Plugin URI: https://wordpress.org/plugins/tenandtwo-xslt-processor/ 14 14 * Description: Transform and display XML from local and remote sources using PHP's XSL extension. 15 * Version: 1.0. 115 * Version: 1.0.2 16 16 * Requires PHP: 7.4 17 17 * Requires at least: 5.2
Note: See TracChangeset
for help on using the changeset viewer.