• 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
Re: Help with markup that passes WOLips editor validation..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with markup that passes WOLips editor validation..


  • Subject: Re: Help with markup that passes WOLips editor validation..
  • From: Miguel Arroz <email@hidden>
  • Date: Mon, 8 Oct 2007 23:37:01 +0100

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@hidden
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@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com


This email sent to email@hidden

Miguel Arroz http://www.terminalapp.net http://www.ipragma.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Help with markup that passes WOLips editor validation.. (From: Q <email@hidden>)

  • Prev by Date: Help with markup that passes WOLips editor validation..
  • Next by Date: Re: WebObjects training: who's offering it
  • Previous by thread: Help with markup that passes WOLips editor validation..
  • Next by thread: [Announce] WebObjects Marketplace Survey 2007
  • Index(es):
    • Date
    • Thread