• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
D2W - Custom forms generated from XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D2W - Custom forms generated from XML


  • Subject: D2W - Custom forms generated from XML
  • From: Flavio Donadio <email@hidden>
  • Date: Thu, 10 Jan 2013 14:35:40 -0200

Hello, people!


I am developing a website admin system using DirectToWeb.

The website has a product catalog, where products are organized by categories:

	ProductCategory <--->> Product

Each Product has a 'specifications' property, where I'm storing technical specs in XML form, which will be formatted on the website through a XSLT stylesheet.

But I want the interface in the admin system to be easy to use. So, I got this idea...

Product has a 'specTemplate' property, where an XML 'template' will be stored. So, let's suppose I have a ProductCategory, "Tablets". The XML for specsTemplate would be something like (just an example, it will be defined later on):

<specs>
	<section name="Physical Characteristics">
		<item name="Form Factor" type="NSString" />
		<subsection name="Dimensions">
			<item name="Width" type="NSNumber" unit="mm" />
			<item name="Height" type="NSNumber" unit="mm" />
			<item name="Depth" type="NSNumber" unit="mm" />
		</subsection>
		<item name="Weight" type="NSNumber" unit="g" />
	</section>
	 [...]
</specs>

When the admin creates a ProductCategory, the structure is defined. This ensures all my products have the same information structure for the specifications, making it easy to create comparison tables and the like. Admins would fill this information in a simpler and faster way. Searching for products by feature would be easy, using PostgreSQL's XML datatype.

When the admin creates or edits a Product, the XML stored in the 'specifications' property would be like:

<specs>
	<section name="Physical Characteristics">
		<item name="Form Factor" type="NSString">Rugged Compact Tablet</item>
		<subsection name="Dimensions">
			<item name="Width" type="NSNumber" unit="mm">145.5</item>
			<item name="Height" type="NSNumber" unit="mm">109</item>
			<item name="Depth" type="NSNumber" unit="mm">12</item>
		</subsection>
		<item name="Weight" type="NSNumber" unit="g">200</item>
	</section>
	 [...]
</specs>

So, how would you guys do this?


Regards,
Flavio
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: D2W - Custom forms generated from XML
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Re: Any interest in a Amazon AMI for Wonder?
  • Next by Date: Re: mod_WebObject for Raspberry Pi
  • Previous by thread: Fwd: Any interest in a Amazon AMI for Wonder?
  • Next by thread: Re: D2W - Custom forms generated from XML
  • Index(es):
    • Date
    • Thread