Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
ActiveIO
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>TagName resolution</h1> <p>TagName resolution <strong>should</strong> only be a matter in xml context. IE, we can fully use the modello-plugin-xml attributes and mecanisms, because we should be in xml context (parser, documentation, schema or anything else).</p> <h3>Where is it done?</h3> <p>It <strong>should</strong> be done in a Utility class, provided by the modello-plugin-xml. As of now, it's done separatly by each plugin, which could lead to very inconsistent behaviour!<br /> For example:</p> <ul> <li>Code snipplet in methods getModelClassDescriptor and writeElementDescriptor in <a href="http://svn.codehaus.org/modello/trunk/modello-plugins/modello-plugin-xdoc/src/main/java/org/codehaus/modello/plugin/xdoc/XdocGenerator.java">XdocGenerator</a></li> <li>method getTagName in <a href="http://svn.codehaus.org/modello/trunk/modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java">XsdGenerator</a></li> <li>method getTagName in <a href="http://svn.codehaus.org/modello/trunk/modello-plugins/modello-plugin-xpp3/src/main/java/org/codehaus/modello/plugin/xpp3/Xpp3ReaderGenerator.java">Xpp3ReaderGenerator</a> and code sniplet, somewhere in method writeClass in <a href="http://svn.codehaus.org/modello/trunk/modello-plugins/modello-plugin-xpp3/src/main/java/org/codehaus/modello/plugin/xpp3/Xpp3WriterGenerator.java">Xpp3WriterGenerator</a></li> <li>...</li> </ul> <h3>How is it done?</h3> <p>The more complete algorithm, for tagName resolution is, according to me:</p> <ol> <li>if xml.tagName is set, this is our tagName, no question there.</li> <li>else <ol> <li>if the we are not in an association : tagName is the name of the class/field (starting with lower case)</li> <li>if we are in an association : <ol> <li>if xml.associationTagName is set, this is our tagName</li> <li>else tagName is the name of the association in singular if xml.listStyle is set to WRAPPED, as given is xml.listStyle is set to FLAT.</li> </ol> </li> </ol> </li> </ol> <h3>Other candidate helper methods</h3> <p>Following helper methods should be included in utility pack somewhere:</p> <ul> <li>isInnerAssociation( Model objectModel, ModelField field )</li> <li>isManyAssociation( Model objectModel, ModelField field )</li> <li>isWrappedAssociation( Model objectModel, ModelField field )</li> <li>isFlatAssociation( Model objectModel, ModelField field )</li> <li>isNonRecursiveAssociation( Model objectModel, ModelClass modelClass, ModelAssociation association )</li> </ul> <p>All of these methods are provided in path <a href="http://jira.codehaus.org/browse/MODELLO-56">http://jira.codehaus.org/browse/MODELLO-56</a> (initially for use in Xdoc Plugin)</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced