You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since xnm:error will never match, the world will be gone. Not good.
I think I can make this an optional warning, if that helps. The rule would go something like this:
When libslax sees a chunk of XML, it will looks for top-level
namespaces whose prefixes match a prefix defined in a top-level
"ns" statement in the main script.
This will allow us to catch errors like your's but without searching the entire new XML document, which could be expensive.
I want to put this all inside a new "warning" infrastructure, so the user can say "-Wprefix-reuse" for this first scenario, -Wprefix-reuse-deep for complete namespace checking, -Wxxx for some future case, and "-Wall" checks these and other future warning flags.
The same logic can be applied to element names as well, so a script can report (after execution) any XML element names used in XPath expressions that were not seen during execution. Again, not check, but if you said "if (xnm:errror)", it would be a complete lifesaver.
Thanks,
Phil
The text was updated successfully, but these errors were encountered:
Lots of non-fatal things can kill you.
Like having the wrong URI for a namespace. Your script looks fine, runs fine, but does not work.
Example:
Since xnm:error will never match, the world will be gone. Not good.
I think I can make this an optional warning, if that helps. The rule would go something like this:
This will allow us to catch errors like your's but without searching the entire new XML document, which could be expensive.
I want to put this all inside a new "warning" infrastructure, so the user can say "-Wprefix-reuse" for this first scenario, -Wprefix-reuse-deep for complete namespace checking, -Wxxx for some future case, and "-Wall" checks these and other future warning flags.
The same logic can be applied to element names as well, so a script can report (after execution) any XML element names used in XPath expressions that were not seen during execution. Again, not check, but if you said "if (xnm:errror)", it would be a complete lifesaver.
Thanks,
Phil
The text was updated successfully, but these errors were encountered: