view _test/Resources/sample.xml @ 221:e997e6fbac0b

sync: working on resources schema
author sergey
date Fri, 24 Aug 2012 16:24:14 +0400
parents 5c82c15b25b1
children 84a6382b49c8
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns="http://implab.org/schemas/resources"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd ">
	<root>
		<get>
			<bind text="model" />
		</get>

		<resource name="projects">
		    <contract>
		      <get>
		          <bind text="parent.model.projects" />
		      </get>
		      <post>
		          <bind text="parent.model.CreateProject($form)">
		              <var name="form" text="request"/>
		          </bind>
		      </post>
		    </contract>
		</resource>
	</root>
	<typeMap>
		<item></item>
		<item></item>
	</typeMap>
	<locators>
		<locator name="relative">
			<var name="id" text="model.id" />
			<var name="parent" text="parent.location" />
			<template>$parent/$id</template>
		</locator>
		<locator name="projects">
			<var name="id" text="model.id" />
			<var name="projects" text="application.locate('projects')" />
			<template>$projects/$id</template>
		</locator>
	</locators>
</resources>