Hi!The only option I see is to do two nested iterations, the outer one on the weeks, and the inner one on the days. Anyway, I don't think your code is wrong. When conflicting between a validator and your head... use your head! :) The two iterations seems a little more elegant IMO, but that's different from being wrong.
Yours Miguel Arroz On 2007/10/08, at 23:28, Q wrote:
Given the usefulness of the validation in the WOLips component editor I am trying to ensure my components are valid XML. However, I can't seem to work out an elegant way to rewrite the following:<webobject name = "DaysInMonthLoop"> <webobject name = "IsValidDate"> <wo:if condition = "~dayCount % 7 == 0"><tr></wo:if><td><webobject name = "UsageGraph"><webobject name = "UsageThumbnail"/></webobject><br/><webobject name = "DayOfMonth"/></td><wo:if condition = "~dayCount % 7 == 6 || isLastDayOfMonth"></ tr></wo:if></webobject> </webobject>The general gist of it is there is an arbitrary number of days to display, and they should be displayed in rows of 7 days. The difficulty is the inclusion of the <tr></tr> tags in the right place within the repetition.Using CSS instead of tables isn't an option unfortunately.I could convert the tags into WOStrings, but that just obfuscates what's happening even more. Is there some other way I have overlooked?-- Seeya...Q Quinton Dolan - [EMAIL PROTECTED] Gold Coast, QLD, Australia (GMT+10) Ph: +61 419 729 806 _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/arroz% 40guiamac.comThis email sent to [EMAIL PROTECTED]
Miguel Arroz http://www.terminalapp.net http://www.ipragma.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
