[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Lightweight browser-based XML / Form editor for taxonomies

  • From: George Cristian Bina <george@oxygenxml.com>
  • To: Lech Rzedzicki <xchaotic@gmail.com>
  • Date: Tue, 06 Dec 2011 21:57:55 +0200

Re:  Lightweight browser-based XML / Form editor for taxonomies
Hi Lech,

You may give oXygen a try - we have the visual editing (Author) mode 
available as a component and it can be used from an Applet. For example, 
if you have a document like test.xml:

<?xml-stylesheet type="text/css" href="test.css"?>
<!DOCTYPE root_element SYSTEM "test.dtd">
<root_element>
   <group xml:id="a1">
     <name>A</name>
     <group xml:id="a2">
       <name>B</name>
       <group xml:id="x1">
         <name>C</name>
         <item xml:id="a4">
           <name>D</name>
           <source>sourceValue</source>
         </item>
         <item xml:id="a5">
           <name>E</name>
           <source>source-value</source>
         </item>
         <item xml:id="x">
           <name>X</name>
           <source>sampleValue</source>
         </item>
       </group>
     </group>
   </group>
</root_element>

with this test.dtd:

<?xml encoding="UTF-8"?>
<!ELEMENT root_element (group*)>
<!ELEMENT group (name, (group|item+))>
<!ATTLIST group
   xml:id ID #REQUIRED>
<!ELEMENT item (name,source)>
<!ATTLIST item
   xml:id ID #REQUIRED>
<!ELEMENT source (#PCDATA)>
<!ELEMENT name (#PCDATA)>

and this test.css:

root_element {
   display : block;
   content : "Taxonomies";
}
group:before {
   content : 'Group[' attr("xml:id") ']';
   color : gray;
}
group {
   display :block;
   -oxy-foldable : true;
   -oxy-not-foldable-child: name;
   padding-left : 1em;
}
item:before {
   content : 'Item[' attr("xml:id") ']';
   color : gray;
}
item {
   display : block;
   margin-left : 0.2em;
}
name {
   display : inline;
   padding-left : 0.2em;
}
source {
   display:inline;
   color : green;
   padding-left : 1em;
}

then you can switch to Author mode and get a nice visual editor with 
foldable groups where you can easily edit the content as in the attached 
oXygenAuthorMode.pdf file. You can also change the CSS or provide 
alternate stylesheet for different renderings.

If you create a document type/framework similar with what we have by 
default for DocBook, DITA, XHTML, TEI, etc. and specify there the CSS 
and DTD then you can add also custom actions to easily insert a group or 
an item. The framework allows also to automatically generate ID 
attributes for elements.

Once you have that working in the oXygen application then you can take 
the framework and pack it with the Author component applet and deploy 
that to have the same editing functionality inside the browser. We have 
a sample applet configured with the DITA framework on our website and 
the source code for that is available
http://www.oxygenxml.com/oxygen_sdk.html#oXygen_component

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 12/6/11 6:52 PM, Lech Rzedzicki wrote:
> Hi.
>
> What would you recommend for authoring XML structures that look more
> or less like this:
>
> <root_element>
>      <group xml:id="1">
>          <name>A</name>
>          <group xml:id="2">
>              <name>B</name>
>              <group xml:id="3">
>                  <name>C</name>
>                  <item xml:id="4">
>                      <name>D</name>
>                      <source></source>
>                  </item>
>              </group>
>          </group>
>      </group>
> </root_element>
>
> Generally this is supposed to represent taxonomies in XML and the
> deepest I have witnessed so far is 9 levels deep, but not necessarily
> the limit, the taxonomies tend to get quite big as well, so I guess
> it'd be good to only fetch a portion of the whole tree at a time...
> XML seems like a perfect fit for representing such a taxonomy (is it?
> - another discussion I guess) but I'm looking for an easy way to
> prototype authoring of it - some button to add group or an item and
> ideally a treeview UI element with a possibility of
> collapsing/expanding portions of the tree.
> So far I have looked at Axel and XForms but they don't seem to deal
> with recursion that well (or do they)? Any suggestion are welcome -
> perhaps a js library or a server-side framework - as long as it is sth
> that will get me there with the least amount of plumbing...
>
> Lech
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>

oXygenAuthorMode.pdf



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.