[Pmwiki-users] More on attachments
Davis, James C.
jdavis at cob.tamucc.edu
Tue Nov 19 16:56:04 CST 2002
> > It would be nice to have both options.
> >
> > A proposed markup would be:
> >
> > [[newwindow http:/www.pmichaud.com/toast Pop-Tarts]]
>
> How about substituting "target" for "newwindow" here, to more closely
> match the <a...> tag definition? Or perhaps allow either one as being
> synonymous?
I think target is better for people who know html, but newwindow is more
intuitive as to what it will actually do. I think they should both be
allowed and be synonymous.
> > and
> > [[newwindow:poptarts http://www.pmichaud.com/toast Pop-Tarts]]
>
> I don't like the use of the colon after newwindow--looks too much like
> a URL or intermap link. I'd prefer "newwindow=" or "target=" there
instead,
> as in:
I agree, = is much better.
> And, just to make the syntax a little easier for PmWiki to parse, require
> the = after the word "target" or "newwindow" even for new windows, as in
Ok, this seems reasonable. Leaving off the name would make the target a new
window with no name (this is what target=_blank means in HTML anyways).
> Hmmmmmmmmmmmmmm. I agree that the attributes should go before the url.
> I'm not so sure about the "assume everything before the url is an
attribute",
> BUT it does bring up an interesting double bracket stylesheet possibility.
> What if we *really* abuse the double brackets and generalize it to be
> something like [[attributes url text]], where any of the three parts are
> optional.
> stuff deleted...
Well I suppose it should not assume "everything" before the url is an
attribute, it should ignore anything that is not a valid attribute for the
object that it is referring to so that it always generates valid HTML (yeah,
I know this will be a pain to code).
I think we may really be on to something here with the idea of using double
brackets like styles.
A general definition of this could be thought of as:
[[attributes reference object]]
Where any one of the three is optional. In the case where you leave off the
object, the reference would become the object as well.
attributes describe how to display the object
reference tells what the object should link to (if anything)
object can be anything that is displayed on the page (currently text and
images)
This would add a great deal of power and flexibility to pmwiki without
adding a lot of complex markup.
I don't know if this is over abuse of double brackets, but it seems like it
just might work. If it is over abuse, maybe we should consider a new type of
brackets for this.
i.e. {{attributes [[reference object]]}}
or
{{attributes object}}
Not sure I like this because it could get messy.
James Davis
Network Manager
College of Business
Texas A&M University - Corpus Christi
(361) 825-5926
jdavis at cob.tamucc.edu
-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at sci.tamucc.edu]
Sent: Tuesday, November 19, 2002 4:18 PM
To: Davis, James C.
Cc: 'pmwiki-users at pmichaud.com'
Subject: RE: [Pmwiki-users] More on attachments
On Tue, 19 Nov 2002, Davis, James C. wrote:
> It would be nice to have both options.
>
> A proposed markup would be:
>
> [[newwindow http:/www.pmichaud.com/toast Pop-Tarts]]
How about substituting "target" for "newwindow" here, to more closely
match the <a...> tag definition? Or perhaps allow either one as being
synonymous?
> and
> [[newwindow:poptarts http://www.pmichaud.com/toast Pop-Tarts]]
I don't like the use of the colon after newwindow--looks too much like
a URL or intermap link. I'd prefer "newwindow=" or "target=" there instead,
as in:
[[target=poptarts http://www.pmichaud.com/toast Pop-Tarts]]
And, just to make the syntax a little easier for PmWiki to parse, require
the = after the word "target" or "newwindow" even for new windows, as in
[[target= http://www.pmichaud.com Pop-Tarts in a new window]]
> I don't like the idea of having the attributes come after the url because
> there is nothing separating them from the link text. I think it should
> assume that everything before the url is an attribute and everything after
> the url is link text.
Hmmmmmmmmmmmmmm. I agree that the attributes should go before the url.
I'm not so sure about the "assume everything before the url is an
attribute",
BUT it does bring up an interesting double bracket stylesheet possibility.
What if we *really* abuse the double brackets and generalize it to be
something like [[attributes url text]], where any of the three parts are
optional. Then we could do things like:
[[color=red This text is Red]]
[[class=foobar rendered with the foobar stylesheet attribute]]
[[color=red target=new http://www.pmichaud.com/toast Pop-Tarts
link displayed in red text and opening in a new window]]
In general, if "attr" is a set of "attribute=value" pairs, then
we could do:
[[url]] link to url rendered as <a href=url>[1]</a>
[[url text]] link to url rendered as <a href=url>text</a>
[[url url.jpg]] link to url rendered as
<a href=url><img src=url.jpg></a>
[[attr url]] link to url rendered as <a href=url attr>[1]</a>
[[attr text]] text rendered as <span attr>text</span>
[[attr url.jpg]] image rendered as <img src=url.jpg attr>
[[attr url text]] link to url rendered as
<a href=url attr><span attr>text</span></a>
[[attr url url.jpg]] link to url rendered as
<a href=url attr><img src=url.jpg attr></a>
Of course, PmWiki might have to be a little smart about knowing which
attributes belong to which tags, or we'd have to be willing to accept that
wiki authors could create documents that aren't really HTML compliant
even according to the transitional DTD.
I'm not sure that I like this idea. I'm not sure that I don't like it.
Any comments?
Pm
More information about the pmwiki-users
mailing list