1 users online. Create an account or sign in to join them.Users


@vincentd - Would love to see the code for that JSON if possible via GIST or something. That would be a great resource.

Great job!

You probably mean d3.js which is the great resource, I used a specific set up of d3 visualization (called circle pack) to turn the leaf nodes into links. Here is the solution to tweak with links and the fiddle

Thanks :-)

@vicentd - Thanks. That's helpful to know about d3.js. Actually, I was asking about the XSLT code that you did to generate the JSON. Is that possible to post? Would love to see what you did.

Ha ok. So, to generate the json I needed 2 pages: a xml and a json.
xml page is used as a remote datasource for multiple requests for different pages (not only for the json page). Its url structure is /xml/$request/$filtertype/$filtervalue

Here is an example of different remote datasources calling this xml page alt text

It is very specific to the needs of this website, but it shows how to have multilevel groups. Here is the gist for xml page and sorry, it s not well commented. For example for xml datasource of the json/d3js I called the $request "tree", lines 51/59 are the different keys, and lines 395/496 the xml manipulation for the output. Here is an example of output.

There is only one json page for different kind of response (same url parameter structure as the xml page : api/$request/$filtertype/$filtervalue). The $request "tree" output the arrays for d3js, the 2 other requests output lists used in backend with remote select box. Here is the gist for json output

Not sure it is clear, and probably not very clean (I am a graphic designer :-p), so if you have suggestions I am always ready to learn.

@vincentd - Wow!!! Very nice! Thank you for sharing. Need to spend some time to look at this in more depth, but looks great so far.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details