-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add XSLTProcessor::registerPHPFunctionNS and DOMXPath::registerPhpFunctionNS #4129
base: master
Are you sure you want to change the base?
Conversation
05590f1
to
ef282a9
Compare
1cfaf84
to
4a94aa4
Compare
The doc directory must be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XML markup changes, to mimic in the other new file.
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the wrapping para tag it is unnecessary.
<para> | ||
This method enables the ability to use a PHP function as a namespaced XPath function inside Xpath expressions. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New manual code style requires <simpara>
instead of <para>
when possible.
The PHP function to call when the Xpath function gets called within the Xpath expression. When a node list is passed | ||
as parameter to the callback, they are arrays containing the matched dom nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semantic line breaks
The PHP function to call when the Xpath function gets called within the Xpath expression. When a node list is passed | |
as parameter to the callback, they are arrays containing the matched dom nodes. | |
The PHP function to call when the Xpath function gets called within the Xpath expression. | |
When a node list is passed as parameter to the callback, | |
they are arrays containing the matched dom nodes. |
&reftitle.examples; | ||
<para> | ||
<example> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the wrapping para tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still hasn't been addressed.
<para> | ||
<simplelist> | ||
<member><methodname>DOMXPath::registerNamespace</methodname></member> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto no wrapping para tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this, apart from Girgias's markup comments I also have 2 content-wise comments, but looks mostly good!
&reftitle.examples; | ||
<para> | ||
<example> | ||
<title><methodname>DOMXPath::registerPHPFunctions</methodname> with <literal>php:functionString</literal></title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title of this example is wrong
|
||
$xpath = new DOMXPath($doc); | ||
|
||
// Register the php: namespace (required) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is wrong
Hopefully I have resolved both your remarks. |
<methodparam><type>callable</type><parameter>callable</parameter></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
This method enables the ability to use a PHP function as a namespaced XPath function inside Xpath expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing word? Also line break as we usually try to keep lines under 80 char.
This method enables the ability to use a PHP function as a namespaced XPath function inside Xpath expressions. | |
This method enables the ability to use a PHP function as a namespaced XPath function | |
inside a Xpath expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually should be "an XPath" instead of "a Xpath" (mind the a vs an, and capitalization)
"an" because it's the pronounciation that counts.
&reftitle.examples; | ||
<para> | ||
<example> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still hasn't been addressed.
<para> | ||
The URI of the namespace. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
The URI of the namespace. | |
</para> | |
<simpara> | |
The URI of the namespace. | |
</simpara> |
<para> | ||
The local function name inside the namespace. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
The local function name inside the namespace. | |
</para> | |
<simpara> | |
The local function name inside the namespace. | |
</simpara> |
<para> | ||
The PHP function to call when the Xpath function gets called within the Xpath expression. | ||
When a node list is passed as parameter to the callback, | ||
they are arrays containing the matched dom nodes. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
The PHP function to call when the Xpath function gets called within the Xpath expression. | |
When a node list is passed as parameter to the callback, | |
they are arrays containing the matched dom nodes. | |
</para> | |
<simpara> | |
The PHP function to call when the Xpath function gets called within the Xpath expression. | |
When a node list is passed as parameter to the callback, | |
they are arrays containing the matched dom nodes. | |
</simpara> |
</refsect1> | ||
<refsect1 role="parameters"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
</refsect1> | |
<refsect1 role="parameters"> | |
</refsect1> | |
<refsect1 role="parameters"> |
<para> | ||
The local function name inside the namespace. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
The local function name inside the namespace. | |
</para> | |
<simpara> | |
The local function name inside the namespace. | |
</simpara> |
<para> | ||
The PHP function to call when the XSL function gets called within the stylesheet. | ||
When a node list is passed as parameter to the callback, | ||
the argument becomes an array containing the matched dom nodes. | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
The PHP function to call when the XSL function gets called within the stylesheet. | |
When a node list is passed as parameter to the callback, | |
the argument becomes an array containing the matched dom nodes. | |
</para> | |
<simpara> | |
The PHP function to call when the XSL function gets called within the stylesheet. | |
When a node list is passed as parameter to the callback, | |
the argument becomes an array containing the matched dom nodes. | |
</simpara> |
<para> | ||
&return.void; | ||
</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<para> | |
&return.void; | |
</para> | |
<simpara> | |
&return.void; | |
</simpara> |
&reftitle.examples; | ||
<para> | ||
<example> | ||
<title>Simple PHP Function call from a stylesheet</title> | ||
<programlisting role="php"><![CDATA[<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto, the wrapping <para>
tag around the <example>
tag is useless, please remove.
Hopefully this PR is correct.
I was not able to build the docs locally.