Giter Site home page Giter Site logo

flibbles / tw5-xml Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 700 KB

XML tools for Tiddlywiki5: import/xport, rendering, parsing wth XPath and CSS Selectors

License: BSD 3-Clause "New" or "Revised" License

JavaScript 96.00% CSS 1.56% HTML 2.45%
tiddlywiki-plugin tiddlywiki5 xml xml-tiddlers xpath css-selector

tw5-xml's People

Contributors

flibbles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zhangaz1

tw5-xml's Issues

Ampersand breaks templates?

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.

Transclusions

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>] }}}

How about event-driven templates ร  la XSLT?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.