Discussion:
XSLT Attribute to Element / Preventing Deletions?
holger krekel
2002-10-03 19:58:30 UTC
Permalink
Hello,

i have two questions.

1) could someone tell how difficult it is to write XSLT-transformations
that convert specific tag-attributes to elements and back again?
Or even better, does someone have a recipe for this?

2) How could/should i prevent BXE from deleting "required" elements and/or
attributes? Basically I don't want a user e.g. erasing (in BXE-WYSIWYG-mode)
the title in this structure:

<list>
<title>sometitle</title>
<li>alksjd</li>
<li>alksjd</li>
</list>

(bxe-attributes left out for convenience)
the title is content-editable and only the complete list or
single elements (<li/>) should be allowed to be deleted.

thanks for any answers or requests for clarification :-)

holger
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
holger krekel
2002-10-04 11:26:01 UTC
Permalink
Hi Roger,

[Roger Fischer Fri, Oct 04, 2002 at 01:17:56PM +0200]
[me]
Post by holger krekel
i have two questions.
1) could someone tell how difficult it is to write
XSLT-transformations
that convert specific tag-attributes to elements and back again?
Or even better, does someone have a recipe for this?
http://lists.xml.org/archives/xml-dev/200203/msg00878.html
Is that the solution you are looking for (see link above)?
Or else can you make an example as I am not sure if I get you right.
Thanks, that helps a bit. I am not sure how to backtransform with this
example, though. Are you confident that the browser's xsl engines
support this?

With backtransforming i mean making a new structure out of the below
structure:

<list title="sometitle">
<li>alksjd</li>
<li>alksjd</li>
</list>
Post by holger krekel
2) How could/should i prevent BXE from deleting "required"
elements and/or attributes? Basically I don't want a user
<list>
<title>sometitle</title>
<li>alksjd</li>
<li>alksjd</li>
</list>
For this question I think you have to wait till Christian is back.
He comes back from the States next week. He will be working starting from
October 9.
If it's very urgent you can call him in the States (he has a triband mobile
+41 76 561 88 60
I'll wait because i don't think this can be solved through the phone.

thanks,

holger
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
holger krekel
2002-10-04 12:03:29 UTC
Permalink
[Roger Fischer Fri, Oct 04, 2002 at 01:47:56PM +0200]
Post by holger krekel
With backtransforming i mean making a new structure out of the below
<list title="sometitle">
<li>alksjd</li>
<li>alksjd</li>
</list>
And why do you want to do this? Is it to be sure, that the title can't be
deleted?
1) the silva-xml has some attributes (like title) which should
be editable and wysiwyg-rendered with BXE. this is currently not possible.

2) therefore i want to transform these attribute into elements which can
be handled/rendered/edited by BXE.

3) before the xml is stored in the silva-cms it needs to be Silva-XML
so i have to "backtransform" the elements into attributes.

I hope this clarifies the whole issue.
You also could do the element-attribute transformation outside the Editor.
That's my current plan but i thought that maybe it's easier or cleaner
to do it with the bitflux-xsl transformations. I probably go with
server-side transformations to be safe (unless you say the proper way
in the BXE architecture would be to do it on the client side).

regards,

holger


P.S.: Is there a reason why you leave out the mailing list? I think
stuff like this is of general interested. It's easy enough
to hit the delete-button if someone is not interested in this
thread.
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Roger Fischer
2002-10-04 12:57:17 UTC
Permalink
And why do you want to do this? Is it to be sure, that the
title can't be
deleted?
1) the silva-xml has some attributes (like title) which should
be editable and wysiwyg-rendered with BXE. this is
currently not possible.
IMHO the ulink url attribute is editable, so I think the list title
attribute can be made editable as well.
Would this be a doable solution? Or do you want to have the title attribute
really displayed as an element, i mean always viewable.
2) therefore i want to transform these attribute into
elements which can
be handled/rendered/edited by BXE.
(see above)
3) before the xml is stored in the silva-cms it needs to be Silva-XML
so i have to "backtransform" the elements into attributes.
If you would leave the attribute to be editable but displayed in the same
way as the ulink url attribute, you wouldn't need the backtransforming. But
as I guess you definitely want the attribute being displayed (as it will be
on the output?).
I hope this clarifies the whole issue.
You also could do the element-attribute transformation
outside the Editor.
That's my current plan but i thought that maybe it's easier or cleaner
to do it with the bitflux-xsl transformations. I probably go with
server-side transformations to be safe (unless you say the proper way
in the BXE architecture would be to do it on the client side).
Hm, I don't know - Christian could tell us this.
It seems you rather can't wait till his back, right.
So I'll send him a SMS message about it. I hope it gets through.

Best
Roger
P.S.: Is there a reason why you leave out the mailing list? I think
stuff like this is of general interested. It's easy enough
to hit the delete-button if someone is not interested in this
thread.
Nope.
I am writing to the mailing list now.
Best
Roger
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Roger Fischer
2002-10-04 10:00:55 UTC
Permalink
Hi Holger
Post by holger krekel
i have two questions.
1) could someone tell how difficult it is to write
XSLT-transformations
that convert specific tag-attributes to elements and back again?
Or even better, does someone have a recipe for this?
http://lists.xml.org/archives/xml-dev/200203/msg00878.html

Is that the solution you are looking for (see link above)?
Or else can you make an example as I am not sure if I get you right.
Post by holger krekel
2) How could/should i prevent BXE from deleting "required"
elements and/or
attributes? Basically I don't want a user e.g. erasing (in
BXE-WYSIWYG-mode)
<list>
<title>sometitle</title>
<li>alksjd</li>
<li>alksjd</li>
</list>
(bxe-attributes left out for convenience)
the title is content-editable and only the complete list or
single elements (<li/>) should be allowed to be deleted.
thanks for any answers or requests for clarification :-)
For this question I think you have to wait till Christian is back.
He comes back from the States next week.

Best
Roger
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Loading...