flibbles / tw5-xml Goto Github PK
View Code? Open in Web Editor NEWXML tools for Tiddlywiki5: import/xport, rendering, parsing wth XPath and CSS Selectors
License: BSD 3-Clause "New" or "Revised" License
XML tools for Tiddlywiki5: import/xport, rendering, parsing wth XPath and CSS Selectors
License: BSD 3-Clause "New" or "Revised" License
Hi Flibbles,
As you know, I'm a big fan of this plugin already. The one thing that I'm missing as of 1.0.1 is the ability for the <$xpath>
widget to choose a template based on the current path, as would XSLT do with <xsl:apply-templates>
.
It is currently quite difficult to process an XML chunk whose schema allows several distinct subpaths at a given XML node: revealing nested <$xpath>
s based on a subpath value doesn't seem impossible with the help of a few variables and some TW5 core widgets, but it would be suboptimal to say the least.
I suggest that in a future version, a mecanism is added to allow the registration of templates based on an xpath string (like <xsl:template>
in XSLT), so that <$xpath>
can choose one of these templates based on the current node it is in.
Thanks again!
Xavier.
Hi Flibbles
Still enjoying your very useful plugin, thanks.
Tried a template today and couldn't get it to work, after filtering through the xml content it seems the '&' ampersand was the problem.
Tested and reproduced it on your demo site on 'Examples/Rendering/Process.xml' - if you put an & after Martha the template breaks. I've got urls in my xml content with '&' in so thought I'd raise it in case there was an easy fix.
Otherwise still working well, thanks a lot.
Thanks for this flibbles.
Is it possible to transclude values into xpath queries? I've tried several ways but no luck. A select seems to transclude the value in but it still doesn't like it.
\define num()<$transclude tiddler="$:/temptest"/>
\define query()/dog[age=$(num)$]/breed
<$select tiddler='$:/temptest'>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='7'>7</option>
</$select>
{{{ [xpath<query>] }}}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.