All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.odf.odfdom-python.pythontest.vm Maven / Gradle / Ivy

The newest version!
##################################################################
## 
## Licensed to the Apache Software Foundation (ASF) under one
## or more contributor license agreements.  See the NOTICE file
## distributed with this work for additional information
## regarding copyright ownership.  The ASF licenses this file
## to you under the Apache License, Version 2.0 (the
## "License"); you may not use this file except in compliance
## with the License.  You may obtain a copy of the License at
## 
##  http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing,
## software distributed under the License is distributed on an
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
## KIND, either express or implied.  See the License for the
## specific language governing permissions and limitations
## under the License.
##
##################################################################

## Context:
##
## - All SortedSets are copies, so in-place ops like remove, add, etc. are allowed
## - Do not use $set2 = $set1 if you want to change only one of these. 
##   Use $set2 = util.copySet($set1) instead.
##
## String odfName: Name of current ODF element (at the time of template initialization)
## SortedSet odfElementNames: Names of all ODF elements
## SortedSet odfElementBaseNames: Names of all ODF base elements
## SortedSet odfAttributeNames: Names of all ODF attributes
## NamespaceDictionars nsdict: Utility to translate between NamespaceURI and local Namespace:
##    String nsdict.getLocalNamespace(String NamespaceURI)
##    String nsdict.getNamespaceURI(String LocalNamespace)
## Expressions util: Utility to get and transform Expression names:
##               String util.extractLocalname(String name)
##               String util.extractNamespace(String name)
##               String util.getQName(Expression exp)
##               String util.camelCase(String raw): some-text-fragment -> SomeTextFragment
##               String util.javaCase(String raw): some-text-fragment -> someTextFragment
##    SortedSet util.emptySet()
##    SortedSet util.copySet(Set original)
## ExpressionViewByName nameView: Access to ODF element and attribute name hierarchy:
##    SortedSet nameView.getElementChildNames(String parentelementname)
##    SortedSet nameView.getElementParentNames(String elementchildname)
##    SortedSet nameView.getAttributeChildNames(String parentelementname)
##    SortedSet nameView.getAttributeParentNames(String attributechildname)
##               String nameView.getElementRename(String elementname)
##               String nameView.getElementBaseName(String elementname)
##               String nameView.getElementsByBaseName(String basename)
##    SortedSet nameView.getElementStyleFamilies(String elementname)
##
# /usr/bin/python

CHILD_ELEMENTS = {
#foreach( $name in $odfElementNames )
	'$name' : ( \
#set($sortedChildren = ${nameView.getElementChildNames($name)})
#foreach($childname in $sortedChildren)
		'$childname', \
#end
),
#end
}

CHILD_ATTRIBUTES = {
#foreach( $name in $odfElementNames )
	'$name' : ( \
#set($sortedAttributes = ${nameView.getAttributeChildNames($name)})
#foreach( $attrname in $sortedAttributes)
		'$attrname', \
#end
),
#end
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy