tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/1632-looking-for-an-example-of-script-which-will-map-data-from-current-page-xml-to-a-different-structure-new-templateCascade CMS: Discussion 2016-08-15T15:18:13Ztag:help-archives.hannonhill.com,2010-02-09:Comment/403181872016-07-13T19:06:34Z2016-07-13T19:06:34ZLooking for an example of script which will map data from current page xml to a different structure (new template)<div><p>Hi Lauri,</p>
<p>This would definitely need to be done using Web Services. If I
recall, Wing has some documentation on migrating structured data
using his library. I made this discussion public to see if he might
follow up with you.</p>
<p>That being said, we have a <a href="http://ideas.hannonhill.com/forums/52559-cascade-cms-ideas/suggestions/921953-migrate-fields-between-data-definitions-and-or-dat">
suggestion on our Idea Exchange</a> for adding the ability to map
structured data, I highly recommend voting this up if you would
like to see the suggestion considered for a future release.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/403181872016-07-13T19:50:00Z2016-07-13T19:50:00ZLooking for an example of script which will map data from current page xml to a different structure (new template)<div><p>I was hoping for an example of translating a content region
through either an XML transform or web services (read page, write
data fields into variables (?), write page-or-xml out, etc).<br>
Can you comment at least on the approach or approaches we might
take? I am feeling we should read and transform the xml first, then
apply new Content Types, etc. There could be a much better
strategy.</p>
<p>Lauri Francis<br>
Web Developer<br>
Carnegie Mellon University<br>
<a href="mailto:lcf@andrew.cmu.edu">lcf@andrew.cmu.edu</a><a href="mailto:lcf@andrew.cmu.edu">lcf@andrew.cmu.edu</a><br>
412.268.1733</p></div>lcftag:help-archives.hannonhill.com,2010-02-09:Comment/403181872016-07-13T20:12:33Z2016-07-13T20:12:33ZLooking for an example of script which will map data from current page xml to a different structure (new template)<div><p>Hi Lauri,</p>
<p>Sounds like you are on the right page. You would essentially
read the page's existing structured data using Web Services, map
that data to the new structured data, and then perform an edit on
the asset.</p>
<p>For reference, <a href="https://github.com/wingmingchan/php-cascade-ws-ns-examples/tree/master/recipes/data_mapping">
here is the data mapping example</a> from Wing's library that I was
referencing.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/403181872016-07-14T13:05:55Z2016-07-14T13:56:31ZLooking for an example of script which will map data from current page xml to a different structure (new template)<div><p>Lauri,</p>
<p>If you need any hand-holding on web services, please let me
know. Mapping data and switching content type/data definition are
very advanced topics, not really for beginners of web services. But
I'll try to help.</p>
<p>Besides data mapping examples, I also provide a few programs I
used at Upstate to convert sites. <a href="https://github.com/wingmingchan/php-cascade-ws-ns-examples/tree/master/recipes/site_conversion">
https://github.com/wingmingchan/php-cascade-ws-ns-examples/tree/mas...</a></p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/403181872016-07-15T15:54:20Z2016-07-15T15:54:20ZLooking for an example of script which will map data from current page xml to a different structure (new template)<div><p>HI Wing,<br>
I am going to be in Syracuse the week of July 18-22 and August 1-5.
I teach a summer class for Syracuse University (and I worked there
up to last fall when I took a job at CMU).<br>
I don’t know what your schedule is like, but if you have some
time in the morning I’d be interested in your thoughts on our
project. This is your work and looked promising as an approach:<br>
<a href="https://github.com/wingmingchan/php-cascade-ws-ns-examples/blob/master/recipes/data_mapping/dd_block_data_mapping.php">
https://github.com/wingmingchan/php-cascade-ws-ns-examples/blob/mas...</a></p>
<p>Email is the best way to stay in touch with me. My cell is
315-317-0313.</p>
<p>Lauri Francis<br>
Web Developer<br>
Carnegie Mellon University<br>
<a href="mailto:lcf@andrew.cmu.edu">lcf@andrew.cmu.edu</a><a href="mailto:lcf@andrew.cmu.edu">lcf@andrew.cmu.edu</a><br>
412.268.1733</p>
<p>On Jul 14, 2016, at 9:06 AM, Wing Ming Chan > wrote:</p></div>lcf