[Catgen-developer] Fw: stories
Status: Beta
Brought to you by:
mbeneteau
|
From: Marc B. <mbe...@ho...> - 2000-09-06 11:19:25
|
> I like this syntax very much. It does away with <a> tags and replace with
a
> simple extensible syntax.
>
> Can we use:
> <cat:productimagesmall ../>
> for an inline image and
> <cat:productimagesmall>click here</cat:productimagesmall>
> For a link, in order to minimize learning of new syntax elements? Also,
can
> we remove case-sensitivity (this is a bit of a pain with xml in my
opinion).
>
> It is essential that it run from both javascript and JSP because the
> "preview" button must do this substitution. In addition, it must put
> "?TPCode=xxx" parameter everywhere.
>
> You mentioned the "nanoXML" project.
(it should not be too difficult to write an invisible applet (running
nanoXML) that will communicate with javascript "preview" button)
> Any other votes?
>
> Vasian are you there?
>
> Marc.
>
> ----- Original Message -----
> From: "Alexey Cholokov" <jt...@nv...>
> To: "Marc Beneteau" <ma...@od...>
> Cc: <be...@re...>; <ew...@al...>
> Sent: Wednesday, September 06, 2000 5:40 AM
> Subject: Re: stories
>
>
> > Hello, Mark, Vasian, Eugene.
> >
> > Using XML constructions inside HTML tags - is it important?
> > I think that we can't use some constructions like in your example if we
> will
> > use standard XML parser.
> > For example: for element "A" we can imagine following construction:
> > <A href="<productimage imagekey='50' align='left'/>"> Alternate text
</A>
> > I think that it is invalid construction for XML. Because we have
attribute
> > value that is XML Element itself.
> >
> > But we can use something like this (first variant):
> > "<cat:productImageRef TPCode="20" ImageKey=50 align="left"
> > alternate="Alternate text" />" and replace it after processing to
> > "<div align="center"><A
href="\servlet\showProduct?TPCode=20&ImageKey=50">
> > Alternate text </A></div>"
> >
> > Or we can write preprocessor that parse only elements that it know (for
> > example prefixed with "cat:") and use something like this (second
> variant):
> > "<p>Click <a href=<cat:productimagesmall productCode="22"/>>here</a> for
a
> > small photo of our china bear."
> >
> > first variant:
> > + can be processed by standard XML parser (it can be useful if you plan
> > story stories in XML, not HTML).
> > both variant:
> > - longer descriptions in comparsion with your idea.
> >
> > So, XML-like syntax can be:
> > <p>Here is a large photo of our china bear: <cat:productimage
> > productCode="22" height="150" width="150" align="right" type="large"/>
> > <p>Click <cat:productimage productCode="22" height="150" width="150"
> > type="small"/>here</a> for a small photo of our china bear.
> > <p>My grandmother: <cat:image ImageKey="22" height="150" width="150"
> > align="right"/>
> > <p>Read more about my grandmother <cat:story
StoryKey="4">here</cat:story>
> > <p>See our <cat:company> company home page</cat:company>
> > <p>All our china bears are made by <cat:producer producerKey="5">My
slave
> > #5</cat:producer>
> > <p>See the <cat:link href="xyz">home page of my slave's labor
> > union</cat:link>
> >
> > Some unclear about "It also has to work from both javascript and jsp".
Is
> it
> > mean that stories must be fetched and formatted if they called from
> > javascript and jsp?
> >
> > ----- Original Message -----
> > From: Marc Beneteau <mbe...@ho...>
> > To: Alexey Cholokov <jt...@nv...>; Marc Beneteau
> <ma...@od...>
> > Cc: Eugene Bortsov <be...@re...>; Vasian
> > <ew...@al...>
> > Sent: Wednesday, September 06, 2000 1:14 AM
> > Subject: Re: stories
> >
> >
> > > Make it happen. The syntax I am proposing is easier than xml but xml
> > would
> > > give us more features in future and also be more standard. Send a
> > proposal
> > > and we will vote on it. Whatever syntax we choose has to work from
> within
> > <a
> > > > tags. It also has to work from both javascript and jsp.
> > >
> > > Marc.
> > >
> > > ----- Original Message -----
> > > From: "Alexey Cholokov" <jt...@nv...>
> > > To: "Marc Beneteau" <ma...@od...>
> > > Cc: "Eugene Bortsov" <be...@re...>; "Vasian"
> > > <ew...@al...>
> > > Sent: Tuesday, September 05, 2000 5:59 PM
> > > Subject: Re: stories
> > >
> > >
> > > > Hello, Mark
> > > >
> > > > ----- Original Message -----
> > > > From: Marc Beneteau
> > > > To: Vasian
> > > > Cc: Alexey Cholokov
> > > > Sent: Tuesday, September 05, 2000 4:30 PM
> > > > Subject: stories
> > > >
> > > >
> > > > > Vasian, Eugene,
> > > >
> > > > > Please give some thought to this design question and let me know.
> > > >
> > > > > I want to allow access within a story to any database entity -
> image,
> > > > company, productimage, producer, even another story. I was thinking
> of
> > > > something like:
> > > >
> > > > > <p>Here is a large photo of our china bear: {productimagelarge 22
> > > > height=150 width=150 align=right}
> > > > > <p>Click <a href={productimagesmall 22}>here</a> for a small photo
> of
> > > our
> > > > china bear.
> > > > > <p>My grandmother: {image 23 align=right}
> > > > > <p>Read more about my grandmother <a href={story 4}>here</a>
> > > > > <p>See our <a href={company}>company home page</a>
> > > > > <p>All our china bears are made by <a href={producer 5}>My slave
> > #5</a>
> > > > > <p>See the <a href={company xyz}>home page of my slave's labor
> > union</a>
> > > >
> > > > > At first I thought some xml type language would be nice, but then
> can
> > we
> > > > make xml work within html anchor tags?
> > > >
> > > > Why not? You can modify some lightweight parser like NanoXML for
this
> > > > purpose. This project (NanoXML) is on SourceForge too.
> > > > Or you can use some tool that use regular expressions (RegExp or
> > something
> > > > like this). I think that they can be easy for use in this case.
> > > >
> > > > > Also the question to be decided of what goes into database - is it
> > > > "untranslated text" or the translated version? I think untranslated
> > text
> > > is
> > > > better (which then need a pre-processor servlet such
> > > > /servlet/Story?StoryKey=22&TPCode=xyx) or is it such as it is now,
> where
> > > > database StoryContent contains translated text which then needs to
be
> > > > untranslated when modifying a story? I am also thinking that the
> TPCode
> > > > needs to be made accessible to javascript because all database
entity
> > > links
> > > > require a TPCode.
> > > >
> > > > Untranstated text is better. Because reverse translation is,
> generally,
> > > more
> > > > complex thing then forward translation..
> > > >
> > > > > Will it work?
> > > >
> > > > > Marc.
> > > >
> > > >
> > > >
> > >
> > >
> >
>
|