You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <one...@us...> - 2003-03-29 04:08:55
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv947/hibernate/type Modified Files: AbstractComponentType.java ComponentType.java DynaBeanType.java ObjectType.java Log Message: * fixed a bug in SQLExpression * fixed a bug in Expression.ge() * improved proxy handling * fixed problems with select new * reworked import mechanism * added <any> mappings Index: AbstractComponentType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/AbstractComponentType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AbstractComponentType.java 3 Feb 2003 10:28:48 -0000 1.5 --- AbstractComponentType.java 29 Mar 2003 04:08:49 -0000 1.6 *************** *** 6,12 **** /** ! * Enables other Component-like types to hold collections */ - public interface AbstractComponentType extends Type { public Type[] getSubtypes(); --- 6,11 ---- /** ! * Enables other Component-like types to hold collections and have cascades, etc. */ public interface AbstractComponentType extends Type { public Type[] getSubtypes(); Index: ComponentType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/ComponentType.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ComponentType.java 15 Feb 2003 08:00:55 -0000 1.8 --- ComponentType.java 29 Mar 2003 04:08:49 -0000 1.9 *************** *** 218,222 **** if (optimizer!=null) { try { ! optimizer.setPropertyValues(component,values); return; } --- 218,222 ---- if (optimizer!=null) { try { ! optimizer.setPropertyValues(component, values); return; } Index: DynaBeanType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/DynaBeanType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DynaBeanType.java 3 Feb 2003 10:28:48 -0000 1.3 --- DynaBeanType.java 29 Mar 2003 04:08:49 -0000 1.4 *************** *** 74,79 **** * @see net.sf.hibernate.type.AbstractComponentType#getPropertyValues(java.lang.Object) */ ! public Object[] getPropertyValues(Object component) ! throws HibernateException { DynaBean bean = (DynaBean) component; --- 74,78 ---- * @see net.sf.hibernate.type.AbstractComponentType#getPropertyValues(java.lang.Object) */ ! public Object[] getPropertyValues(Object component) throws HibernateException { DynaBean bean = (DynaBean) component; Index: ObjectType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/type/ObjectType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectType.java 19 Feb 2003 02:02:08 -0000 1.5 --- ObjectType.java 29 Mar 2003 04:08:49 -0000 1.6 *************** *** 6,10 **** import java.sql.ResultSet; import java.sql.SQLException; - import java.sql.Types; import net.sf.hibernate.Hibernate; --- 6,9 ---- *************** *** 14,21 **** import net.sf.hibernate.engine.SessionFactoryImplementor; import net.sf.hibernate.engine.SessionImplementor; ! import net.sf.hibernate.util.ReflectHelper; public class ObjectType extends AbstractType { /** * @see net.sf.hibernate.type.Type#deepCopy(Object) --- 13,30 ---- import net.sf.hibernate.engine.SessionFactoryImplementor; import net.sf.hibernate.engine.SessionImplementor; ! import net.sf.hibernate.util.ArrayHelper; public class ObjectType extends AbstractType { + private Type identifierType; + + public ObjectType(Type identifierType) { + this.identifierType = identifierType; + } + + public ObjectType() { + this(Hibernate.SERIALIZABLE); + } + /** * @see net.sf.hibernate.type.Type#deepCopy(Object) *************** *** 79,94 **** //if ( names.length!=2 ) throw new HibernateException("object type mapping must specify exactly two columns"); ! String className = (String) Hibernate.STRING.nullSafeGet( rs, names[0] ); ! Serializable id = (Serializable) Hibernate.SERIALIZABLE.nullSafeGet( rs, names[1] ); ! if (className==null || id==null) { return null; } else { ! try { ! return session.load( ReflectHelper.classForName(className), id ); ! } ! catch (ClassNotFoundException cnfe) { ! throw new HibernateException("Class not found: " + className); ! } } } --- 88,98 ---- //if ( names.length!=2 ) throw new HibernateException("object type mapping must specify exactly two columns"); ! Class clazz = (Class) Hibernate.CLASS.nullSafeGet( rs, names[0] ); ! Serializable id = (Serializable) identifierType.nullSafeGet(rs, names[1], session, owner); ! if (clazz==null || id==null) { return null; } else { ! return session.load(clazz, id); } } *************** *** 100,113 **** throws HibernateException, SQLException { if (value==null) { ! st.setNull(index, Types.VARCHAR); ! st.setNull(index+1, Types.VARBINARY); } else { ! Serializable id = session.getEntityIdentifierIfNotUnsaved(value); ! String className = value.getClass().getName(); ! Hibernate.STRING.nullSafeSet(st, className, index, session); ! Hibernate.SERIALIZABLE.nullSafeSet(st, id, index+1, session); } } --- 104,120 ---- throws HibernateException, SQLException { + Serializable id; + Class clazz; if (value==null) { ! id=null; ! clazz=null; } else { ! id = session.getEntityIdentifierIfNotUnsaved(value); ! clazz = value.getClass(); } + + Hibernate.CLASS.nullSafeSet(st, clazz, index, session); + identifierType.nullSafeSet(st, id, index+1, session); } *************** *** 119,129 **** } ! private static final int[] SQL_TYPES = new int[] { Types.VARCHAR, Types.VARBINARY }; /** * @see net.sf.hibernate.type.Type#sqlTypes(Mapping) */ ! public int[] sqlTypes(Mapping pi) throws MappingException { ! return SQL_TYPES; } --- 126,139 ---- } ! //private static final int[] SQL_TYPES = new int[] { Types.VARCHAR, Types.VARBINARY }; /** * @see net.sf.hibernate.type.Type#sqlTypes(Mapping) */ ! public int[] sqlTypes(Mapping mapping) throws MappingException { ! return ArrayHelper.join( ! Hibernate.CLASS.sqlTypes(mapping), ! identifierType.sqlTypes(mapping) ! ); } *************** *** 162,166 **** public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { ! return (value==null) ? null : new ObjectTypeCacheEntry( value.getClass(), session.getEntityIdentifier(value) ); } --- 172,181 ---- public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException { ! return (value==null) ? ! null : ! new ObjectTypeCacheEntry( ! value.getClass(), ! session.getEntityIdentifier(value) ! ); } |
From: <one...@us...> - 2003-03-29 04:08:51
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy In directory sc8-pr-cvs1:/tmp/cvs-serv947/hibernate/proxy Modified Files: HibernateProxyHelper.java LazyInitializer.java Log Message: * fixed a bug in SQLExpression * fixed a bug in Expression.ge() * improved proxy handling * fixed problems with select new * reworked import mechanism * added <any> mappings Index: HibernateProxyHelper.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/HibernateProxyHelper.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HibernateProxyHelper.java 13 Mar 2003 03:16:01 -0000 1.6 --- HibernateProxyHelper.java 29 Mar 2003 04:08:48 -0000 1.7 *************** *** 4,27 **** import net.sf.cglib.Enhancer; - import net.sf.hibernate.HibernateException; - import net.sf.hibernate.engine.SessionImplementor; - public final class HibernateProxyHelper { - - /** - * Initializes the proxy if necessary! - */ - public static Object unproxy(Object object, SessionImplementor session) throws HibernateException { - - if ( object instanceof HibernateProxy ) { - HibernateProxy proxy = (HibernateProxy) object; - LazyInitializer li = getLazyInitializer(proxy); - li.setSession(session); - return li.getImplementation(); //initialize + unwrap the object - } - else { - return object; - } - } public static LazyInitializer getLazyInitializer(HibernateProxy proxy) { --- 4,8 ---- Index: LazyInitializer.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/LazyInitializer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LazyInitializer.java 22 Jan 2003 13:09:19 -0000 1.5 --- LazyInitializer.java 29 Mar 2003 04:08:48 -0000 1.6 *************** *** 5,9 **** import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; - import java.sql.SQLException; import org.apache.commons.logging.LogFactory; --- 5,8 ---- *************** *** 35,39 **** } ! public void initialize() throws HibernateException, SQLException { if (target==null) { if ( session==null ) { --- 34,38 ---- } ! public void initialize() throws HibernateException { if (target==null) { if ( session==null ) { |
From: <one...@us...> - 2003-03-29 04:08:51
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/metadata In directory sc8-pr-cvs1:/tmp/cvs-serv947/hibernate/metadata Modified Files: ClassMetadata.java Log Message: * fixed a bug in SQLExpression * fixed a bug in Expression.ge() * improved proxy handling * fixed problems with select new * reworked import mechanism * added <any> mappings Index: ClassMetadata.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/metadata/ClassMetadata.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClassMetadata.java 5 Jan 2003 02:11:22 -0000 1.3 --- ClassMetadata.java 29 Mar 2003 04:08:48 -0000 1.4 *************** *** 40,43 **** --- 40,53 ---- /** + * Get the value of a particular (named) property + */ + public Object getPropertyValue(Object object, String propertyName) throws HibernateException; + + /** + * Set the value of a particular (named) property + */ + public void setPropertyValue(Object object, String propertyName, Object value) throws HibernateException; + + /** * Return the values of the mapped properties of the object */ |
From: <one...@us...> - 2003-03-29 04:08:51
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv947/hibernate/persister Modified Files: AbstractEntityPersister.java EntityPersister.java NormalizedEntityPersister.java Log Message: * fixed a bug in SQLExpression * fixed a bug in Expression.ge() * improved proxy handling * fixed problems with select new * reworked import mechanism * added <any> mappings Index: AbstractEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/AbstractEntityPersister.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AbstractEntityPersister.java 16 Feb 2003 01:55:06 -0000 1.14 --- AbstractEntityPersister.java 29 Mar 2003 04:08:48 -0000 1.15 *************** *** 116,119 **** --- 116,121 ---- private transient final ReflectHelper.Getter[] getters; private transient final ReflectHelper.Setter[] setters; + private transient final HashMap gettersByPropertyName = new HashMap(); + private transient final HashMap settersByPropertyName = new HashMap(); protected transient final int hydrateSpan; *************** *** 582,609 **** idgen = model.getIdentifier().createIdentifierGenerator(dialect); useIdentityColumn = idgen instanceof IdentityGenerator; ! identitySelectString = (useIdentityColumn) ? dialect.getIdentitySelectString() : null; // UNSAVED-VALUE: ! String cts = model.getIdentifier().getNullValue(); ! if ( cts==null || "any".equals(cts) ) { unsavedIdentifierValue=Cascades.SAVE_ANY; } ! else if ( "none".equals(cts) ) { unsavedIdentifierValue=Cascades.SAVE_NONE; } ! else if ( "null".equals(cts) ) { unsavedIdentifierValue=Cascades.SAVE_NULL; } else { try { ! unsavedIdentifierValue = new Cascades.IdentifierValue( ( (IdentifierType) model.getIdentifier().getType() ).stringToObject(cts) ); } catch (ClassCastException cce) { ! throw new MappingException("Bad identifier type: " + model.getIdentifier().getType().getClass().getName() ); } catch (Exception e) { ! throw new MappingException("Could not parse unsaved-value: " + cts); } } --- 584,612 ---- idgen = model.getIdentifier().createIdentifierGenerator(dialect); useIdentityColumn = idgen instanceof IdentityGenerator; ! identitySelectString = useIdentityColumn ? dialect.getIdentitySelectString() : null; // UNSAVED-VALUE: ! String unsavedValue = model.getIdentifier().getNullValue(); ! if ( unsavedValue==null || "any".equals(unsavedValue) ) { unsavedIdentifierValue=Cascades.SAVE_ANY; } ! else if ( "none".equals(unsavedValue) ) { unsavedIdentifierValue=Cascades.SAVE_NONE; } ! else if ( "null".equals(unsavedValue) ) { unsavedIdentifierValue=Cascades.SAVE_NULL; } else { + Type idType = model.getIdentifier().getType(); try { ! unsavedIdentifierValue = new Cascades.IdentifierValue( ( (IdentifierType) idType ).stringToObject(unsavedValue) ); } catch (ClassCastException cce) { ! throw new MappingException("Bad identifier type: " + idType.getClass().getName() ); } catch (Exception e) { ! throw new MappingException("Could not parse unsaved-value: " + unsavedValue); } } *************** *** 662,665 **** --- 665,671 ---- propertyInsertability[i] = prop.isInsertable(); + gettersByPropertyName.put( propertyNames[i], getters[i] ); + settersByPropertyName.put( propertyNames[i], setters[i] ); + cascadeStyles[i] = prop.getCascadeStyle(); if ( cascadeStyles[i]!=Cascades.STYLE_NONE ) foundCascade = true; *************** *** 759,762 **** --- 765,780 ---- } + public Object getPropertyValue(Object object, String propertyName) + throws HibernateException { + + return ( (ReflectHelper.Getter) gettersByPropertyName.get(propertyName) ).get(object); + } + + public void setPropertyValue(Object object, String propertyName, Object value) + throws HibernateException { + + ( (ReflectHelper.Setter) settersByPropertyName.get(propertyName) ).set(object, value); + } + } Index: EntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/EntityPersister.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** EntityPersister.java 16 Mar 2003 01:45:52 -0000 1.21 --- EntityPersister.java 29 Mar 2003 04:08:48 -0000 1.22 *************** *** 7,10 **** --- 7,11 ---- import net.sf.hibernate.loader.SimpleEntityLoader; import net.sf.hibernate.loader.UniqueEntityLoader; + import net.sf.hibernate.mapping.Any; import net.sf.hibernate.mapping.Column; import net.sf.hibernate.mapping.Component; *************** *** 29,32 **** --- 30,34 ---- import org.apache.commons.logging.LogFactory; + import net.sf.hibernate.Hibernate; import net.sf.hibernate.HibernateException; import net.sf.hibernate.LockMode; *************** *** 112,116 **** mods.put(idpath, idType); columnNamesByPropertyPath.put(idpath, columns); ! if ( idType.isComponentType() ) { AbstractComponentType actype = (AbstractComponentType) idType; String[] props = actype.getPropertyNames(); --- 114,118 ---- mods.put(idpath, idType); columnNamesByPropertyPath.put(idpath, columns); ! if ( idType.isComponentType() || idType.isObjectType() ) { AbstractComponentType actype = (AbstractComponentType) idType; String[] props = actype.getPropertyNames(); *************** *** 795,799 **** Iterator iter = ( (Component) prop.getValue() ).getPropertyIterator(); while ( iter.hasNext() ) { - typesByPropertyPath.put( path, prop.getType() ); initPropertyPaths( (Property) iter.next(), path + "." ) ; } --- 797,800 ---- *************** *** 809,815 **** Type type = prop.getType(); typesByPropertyPath.put(path, type); - columnNamesByPropertyPath.put(path, names); } --- 810,834 ---- Type type = prop.getType(); + typesByPropertyPath.put(path, type); columnNamesByPropertyPath.put(path, names); + + if ( prop.getValue().isAny() ) { + String idpath = path + ".id"; + String clpath = path + ".class"; + + Any any = (Any) prop.getValue(); + typesByPropertyPath.put( idpath, any.getIdentifierType() ); + typesByPropertyPath.put( clpath, Hibernate.CLASS ); + + iter = any.getColumnIterator(); + columnNamesByPropertyPath.put( clpath, new String[] { ( (Column) iter.next() ).getName() } ); + names = new String[ any.getColumnSpan() - 1 ]; + k=0; + while ( iter.hasNext() ) { + names[k++] = ( (Column) iter.next() ).getName(); + } + columnNamesByPropertyPath.put(idpath, names); + } } Index: NormalizedEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/NormalizedEntityPersister.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NormalizedEntityPersister.java 16 Mar 2003 01:45:52 -0000 1.14 --- NormalizedEntityPersister.java 29 Mar 2003 04:08:48 -0000 1.15 *************** *** 7,10 **** --- 7,11 ---- import net.sf.hibernate.loader.EntityLoader; import net.sf.hibernate.loader.UniqueEntityLoader; + import net.sf.hibernate.mapping.Any; import net.sf.hibernate.mapping.Column; import net.sf.hibernate.mapping.Component; *************** *** 132,136 **** columnNamesByPropertyPath.put(idpath, columns); tableNumberByPropertyPath.put(idpath, table); ! if ( idType.isComponentType() ) { AbstractComponentType actype = (AbstractComponentType) idType; String[] props = actype.getPropertyNames(); --- 133,137 ---- columnNamesByPropertyPath.put(idpath, columns); tableNumberByPropertyPath.put(idpath, table); ! if ( idType.isComponentType() || idType.isObjectType() ) { AbstractComponentType actype = (AbstractComponentType) idType; String[] props = actype.getPropertyNames(); *************** *** 896,900 **** Iterator iter = ( (Component) prop.getValue() ).getPropertyIterator(); while ( iter.hasNext() ) { - typesByPropertyPath.put( path, prop.getType() ); initPropertyPaths( (Property) iter.next(), path + "." ) ; } --- 897,900 ---- *************** *** 905,924 **** int k=0; while ( iter.hasNext() ) { ! names[k] = ( (Column) iter.next() ).getName(); ! k++; } ! tableNumberByPropertyPath.put( ! path, ! new Integer( getTableId( ! prop.getValue().getTable().getQualifiedName( factory.getDefaultSchema() ), ! subclassTableNameClosure ! ) ) ! ); ! Type type = prop.getType(); typesByPropertyPath.put(path, type); ! columnNamesByPropertyPath.put(path, names); } --- 905,941 ---- int k=0; while ( iter.hasNext() ) { ! names[k++] = ( (Column) iter.next() ).getName(); } ! Integer tabno = new Integer( getTableId( ! prop.getValue().getTable().getQualifiedName( factory.getDefaultSchema() ), ! subclassTableNameClosure ! ) ); ! Type type = prop.getType(); + typesByPropertyPath.put(path, type); ! tableNumberByPropertyPath.put(path, tabno); columnNamesByPropertyPath.put(path, names); + + if ( prop.getValue().isAny() ) { + String idpath = path + ".id"; + String clpath = path + ".class"; + + Any any = (Any) prop.getValue(); + typesByPropertyPath.put( idpath, any.getIdentifierType() ); + typesByPropertyPath.put( clpath, Hibernate.CLASS ); + + iter = any.getColumnIterator(); + columnNamesByPropertyPath.put( clpath, new String[] { ( (Column) iter.next() ).getName() } ); + names = new String[ any.getColumnSpan() - 1 ]; + k=0; + while ( iter.hasNext() ) { + names[k++] = ( (Column) iter.next() ).getName(); + } + columnNamesByPropertyPath.put(idpath, names); + tableNumberByPropertyPath.put(idpath, tabno); + tableNumberByPropertyPath.put(clpath, tabno); + } } |
From: <tu...@us...> - 2003-03-27 23:18:53
|
Update of /cvsroot/hibernate/Hibernate2 In directory sc8-pr-cvs1:/tmp/cvs-serv32286 Modified Files: build.xml Log Message: Added new doco generation stuff including wiki, see refdoc and wikidoc Index: build.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build.xml 12 Mar 2003 12:28:57 -0000 1.11 --- build.xml 27 Mar 2003 23:18:48 -0000 1.12 *************** *** 1,3 **** ! <!-- Hibernate ANT build script. --- 1,3 ---- ! <!-- Hibernate ANT build script. *************** *** 27,32 **** <property name="doc.dir" value="doc"/> <property name="doc.api.dir" value="${doc.dir}/api"/> ! <property name="dist.api.dir" value="${dist.dir}/doc/api"/> ! <property name="dist.doc.dir" value="${dist.dir}/doc"/> <property name="dist.src.dir" value="${dist.dir}/src"/> <property name="dist.lib.dir" value="${dist.dir}/lib"/> --- 27,36 ---- <property name="doc.dir" value="doc"/> <property name="doc.api.dir" value="${doc.dir}/api"/> ! <property name="doc.ref.dir" value="${doc.dir}/reference"/> ! ! <property name="dist.doc.dir" value="${dist.dir}/doc"/> ! <property name="dist.api.dir" value="${dist.dir}/doc/hib_docs/api"/> ! <property name="dist.ref.dir" value="${dist.dir}/doc/hib_docs/reference"/> ! <property name="dist.src.dir" value="${dist.dir}/src"/> <property name="dist.lib.dir" value="${dist.dir}/lib"/> *************** *** 59,71 **** </patternset> ! <patternset id="doc.files"> <include name="**/*.css"/> <include name="**/*.jpg"/> <include name="**/*.gif"/> ! <include name="**/*.html"/> ! <include name="**/*.pdf"/> ! <include name="**/*.eps"/> </patternset> ! <patternset id="source.files"> <include name="**/*.java"/> --- 63,73 ---- </patternset> ! <patternset id="refdoc.files"> <include name="**/*.css"/> <include name="**/*.jpg"/> <include name="**/*.gif"/> ! <include name="**/*.png"/> </patternset> ! <patternset id="source.files"> <include name="**/*.java"/> *************** *** 151,155 **** </fileset> </jar> ! </target> <target name="javadoc" description="Compile the Javadoc API documentation to dist dir"> --- 153,159 ---- </fileset> </jar> ! </target> ! ! <!-- DOCUMENTATION --> <target name="javadoc" description="Compile the Javadoc API documentation to dist dir"> *************** *** 158,163 **** sourcepath="${src.dir}" packagenames="net.sf.hibernate,net.sf.hibernate.expression,net.sf.hibernate.id,net.sf.hibernate.connection,net.sf.hibernate.transaction,net.sf.hibernate.type,net.sf.hibernate.dialect,net.sf.hibernate.odmg,net.sf.hibernate.cfg,net.sf.hibernate.cache,net.sf.hibernate.jmx,net.sf.hibernate.loader,net.sf.hibernate.persister,net.sf.hibernate.engine,net.sf.hibernate.metadata,net.sf.hibernate.mapping" ! classpathref="lib.class.path" ! destdir="${dist.api.dir}" use="true" protected="true" --- 162,167 ---- sourcepath="${src.dir}" packagenames="net.sf.hibernate,net.sf.hibernate.expression,net.sf.hibernate.id,net.sf.hibernate.connection,net.sf.hibernate.transaction,net.sf.hibernate.type,net.sf.hibernate.dialect,net.sf.hibernate.odmg,net.sf.hibernate.cfg,net.sf.hibernate.cache,net.sf.hibernate.jmx,net.sf.hibernate.loader,net.sf.hibernate.persister,net.sf.hibernate.engine,net.sf.hibernate.metadata,net.sf.hibernate.mapping" ! classpathref="lib.class.path" ! destdir="${dist.api.dir}" use="true" protected="true" *************** *** 176,223 **** </target> ! <target name="docbook" description="Compile docbook documentation to html"> ! <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${doc.dir}/reference/src/"> ! <arg value="-o"/> ! <arg value="../html_single/index.html"/> ! <arg value="index.xml"/> ! <arg value="../xsl/html/docbook.xsl"/> ! </java> ! <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${doc.dir}/reference/src/"> ! <arg value="index.xml"/> ! <arg value="../xsl/html/chunk.xsl"/> ! </java> ! </target> - <target name="aft" description="Compile aft documentation to html and copy to dist dir"> - <mkdir dir="${dist.doc.dir}"/> - <apply executable="aft" dir="${doc.dir}" vmlauncher="false"> <!-- relative="true" --> - <fileset dir="${doc.dir}"> - <include name="*.aft"/> - </fileset> - </apply> - <copy todir="${dist.doc.dir}"> - <fileset dir="${doc.dir}"> - <patternset refid="doc.files"/> - <exclude name="api/**/*"/> - <exclude name="reference/**/*"/> - </fileset> - </copy> - </target> - - <target name="copydoc"> - <mkdir dir="${dist.doc.dir}"/> - <copy todir="${dist.doc.dir}"> - <fileset dir="${doc.dir}"> - <patternset refid="doc.files"/> - <exclude name="*"/> - <exclude name="api/**/*"/> - <exclude name="reference/src/**/*"/> - <exclude name="reference/images/*.pdf"/> - </fileset> - </copy> - </target> - <target name="extras" description="Copies miscellaneous files to root dir"> <copy todir="${dist.dir}/bin"> --- 180,252 ---- </target> ! <target name="docpdf" description="Compile reference documentation to pdf"> ! <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}/${doc.ref.dir}"> ! <classpath> ! <fileset dir="${doc.ref.dir}/lib"> ! <include name="**/*.jar"/> ! </fileset> ! </classpath> ! <arg value="-o"/> ! <arg value="${basedir}/${dist.ref.dir}/pdf/docbook_fop.tmp"/> ! <arg value="src/index.xml"/> ! <arg value="styles/fopdf.xsl"/> ! </java> ! <java classname="org.apache.fop.apps.Fop" fork="true" dir="${basedir}/${doc.ref.dir}"> ! <classpath> ! <fileset dir="${doc.ref.dir}/lib"> ! <include name="**/*.jar"/> ! </fileset> ! </classpath> ! <arg value="${basedir}/${dist.ref.dir}/pdf/docbook_fop.tmp"/> ! <arg value="${basedir}/${dist.ref.dir}/pdf/hibernate_reference.pdf"/> ! </java> ! <delete file="${basedir}/${dist.ref.dir}/pdf/docbook_fop.tmp"/> ! </target> + <target name="dochtml" description="Compile reference documentation to chunked html"> + <mkdir dir="${basedir}/${dist.ref.dir}/html/"/> + <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}/${dist.ref.dir}/html/"> + <classpath> + <fileset dir="${doc.ref.dir}/lib"> + <include name="**/*.jar"/> + </fileset> + </classpath> + <arg value="${basedir}/${doc.ref.dir}/src/index.xml"/> + <arg value="${basedir}/${doc.ref.dir}/styles/html_chunk.xsl"/> + </java> + </target> + + <target name="dochtmlsingle" description="Compile reference documentation to single html"> + <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}/${doc.ref.dir}"> + <classpath> + <fileset dir="${basedir}/${doc.dir}/reference/lib"> + <include name="**/*.jar"/> + </fileset> + </classpath> + <arg value="-o"/> + <arg value="${basedir}/${dist.ref.dir}/html_single/index.html"/> + <arg value="${basedir}/${doc.ref.dir}/src/index.xml"/> + <arg value="${basedir}/${doc.ref.dir}/styles/html.xsl"/> + </java> + </target> + + <target name="refdoc" depends="docpdf,dochtml,dochtmlsingle" description="Generate and copy reference documentation"> + <copy todir="${basedir}/${dist.ref.dir}"> + <fileset dir="${basedir}/${doc.ref.dir}"> + <patternset refid="refdoc.files"/> + </fileset> + </copy> + </target> + + <target name="wikidoc" description="Fetch current Wiki snapshot and untar it"> + <mkdir dir="${basedir}/${dist.dir}"/> + <get src="http://hibernate.bluemars.net/wiki_snapshot.tar.gz" dest="${basedir}/${dist.dir}/wiki_snapshot.tar.gz" verbose="true" /> + <gunzip src="${basedir}/${dist.dir}/wiki_snapshot.tar.gz"/> + <untar src="${basedir}/${dist.dir}/wiki_snapshot.tar" dest="${basedir}/${dist.dir}"/> + <delete file="${basedir}/${dist.dir}/wiki_snapshot.tar.gz"/> + <delete file="${basedir}/${dist.dir}/wiki_snapshot.tar"/> + </target> <target name="extras" description="Copies miscellaneous files to root dir"> <copy todir="${dist.dir}/bin"> *************** *** 238,242 **** </target> ! <target name="dist" depends="jar,javadoc,copysource,copylib,copydoc,extras" description="Build everything"> <zip zipfile = "${dist.dir}.zip"> <zipfileset prefix="${name}-${version}" dir="${dist.dir}"/> --- 267,271 ---- </target> ! <target name="dist" depends="jar,wikidoc,javadoc,refdoc,copysource,copylib,extras" description="Build everything"> <zip zipfile = "${dist.dir}.zip"> <zipfileset prefix="${name}-${version}" dir="${dist.dir}"/> *************** *** 295,297 **** </target> ! </project> \ No newline at end of file --- 324,326 ---- </target> ! </project> |
From: <tu...@us...> - 2003-03-27 23:17:47
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/styles In directory sc8-pr-cvs1:/tmp/cvs-serv31798/doc/reference/styles Added Files: fopdf.xsl html_chunk.xsl html.css html.xsl Log Message: Refactored stylesheets --- NEW FILE: fopdf.xsl --- <?xml version="1.0"?> <!-- This is the XSL FO configuration file for the Hibernate Reference Documentation. It defines a custom titlepage and the parameters for the A4 sized PDF printable output. It took me days to figure out this stuff and fix most of the obvious bugs in the DocBook XSL distribution, so if you use this stylesheet, give some credit back to the Hibernate project. chr...@bl... --> <!DOCTYPE xsl:stylesheet [ <!ENTITY db_xsl_path "../lib/docbook-xsl/"> <!ENTITY admon_gfx_path "../images/admons/"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="#default"> <xsl:import href="&db_xsl_path;/fo/docbook.xsl"/> <!--################################################### Custom Title Page ################################################### --> <xsl:template name="book.titlepage.recto"> <fo:block> <fo:table table-layout="fixed" width="175mm"> <fo:table-column column-width="175mm"/> <fo:table-body> <fo:table-row> <fo:table-cell text-align="center"> <fo:block> <fo:external-graphic src="file:images/hibernate_logo_a.png"/> </fo:block> <fo:block font-family="Helvetica" font-size="22pt" padding-before="10mm"> <xsl:value-of select="bookinfo/subtitle"/> </fo:block> <fo:block font-family="Helvetica" font-size="12pt" padding="10mm"> Version: <xsl:value-of select="bookinfo/releaseinfo"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </xsl:template> <!-- Prevent blank pages in output --> <xsl:template name="book.titlepage.before.verso"> </xsl:template> <xsl:template name="book.titlepage.verso"> </xsl:template> <xsl:template name="book.titlepage.separator"> </xsl:template> <!--################################################### Header ################################################### --> <!-- More space in the center header for long text --> <xsl:attribute-set name="header.content.properties"> <xsl:attribute name="font-family"> <xsl:value-of select="$body.font.family"/> </xsl:attribute> <xsl:attribute name="margin-left">-5em</xsl:attribute> <xsl:attribute name="margin-right">-5em</xsl:attribute> </xsl:attribute-set> <!--################################################### Custom Footer ################################################### --> <!-- This footer prints the Hibernate version number on the left side --> <xsl:template name="footer.content"> <xsl:param name="pageclass" select="''"/> <xsl:param name="sequence" select="''"/> <xsl:param name="position" select="''"/> <xsl:param name="gentext-key" select="''"/> <xsl:variable name="Version"> <xsl:choose> <xsl:when test="//releaseinfo"> <xsl:text>Hibernate </xsl:text><xsl:value-of select="//releaseinfo"/> </xsl:when> <xsl:otherwise> <!-- nop --> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$sequence='blank'"> <xsl:choose> <xsl:when test="$double.sided != 0 and $position = 'left'"> <xsl:value-of select="$Version"/> </xsl:when> <xsl:when test="$double.sided = 0 and $position = 'center'"> <!-- nop --> </xsl:when> <xsl:otherwise> <fo:page-number/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="$pageclass='titlepage'"> <!-- nop: other titlepage sequences have no footer --> </xsl:when> <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'"> <fo:page-number/> </xsl:when> <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'"> <fo:page-number/> </xsl:when> <xsl:when test="$double.sided = 0 and $position='right'"> <fo:page-number/> </xsl:when> <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'"> <xsl:value-of select="$Version"/> </xsl:when> <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'"> <xsl:value-of select="$Version"/> </xsl:when> <xsl:when test="$double.sided = 0 and $position='left'"> <xsl:value-of select="$Version"/> </xsl:when> <xsl:otherwise> <!-- nop --> </xsl:otherwise> </xsl:choose> </xsl:template> <!--################################################### Custom Toc Line ################################################### --> <!-- The default DocBook XSL TOC printing is seriously broken... --> <xsl:template name="toc.line"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <!-- justify-end removed from block attributes (space problem in title.markup) --> <fo:block end-indent="{$toc.indent.width}pt" last-line-end-indent="-{$toc.indent.width}pt" white-space-treatment="preserve" white-space-collapse="false"> <fo:inline keep-with-next.within-line="always"> <!-- print Chapters in bold style --> <xsl:choose> <xsl:when test="local-name(.) = 'chapter'"> <xsl:attribute name="font-weight">bold</xsl:attribute> </xsl:when> </xsl:choose> <fo:basic-link internal-destination="{$id}"> <xsl:if test="$label != ''"> <xsl:copy-of select="$label"/> <fo:inline white-space-treatment="preserve" white-space-collapse="false"> <xsl:value-of select="$autotoc.label.separator"/> </fo:inline> </xsl:if> <xsl:apply-templates select="." mode="title.markup"/> </fo:basic-link> </fo:inline> <fo:inline keep-together.within-line="always"> <xsl:text> </xsl:text> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <xsl:text> </xsl:text> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> </fo:inline> </fo:block> </xsl:template> <!--################################################### Extensions ################################################### --> <!-- These extensions are required for table printing and other stuff --> <xsl:param name="use.extensions">1</xsl:param> <xsl:param name="tablecolumns.extension">0</xsl:param> <xsl:param name="callout.extensions">1</xsl:param> <!-- FOP provide only PDF Bookmarks at the moment --> <xsl:param name="fop.extensions">1</xsl:param> <!--################################################### Table Of Contents ################################################### --> <!-- Generate the TOCs for named components only --> <xsl:param name="generate.toc"> book toc </xsl:param> <!-- Show only Sections up to level 3 in the TOCs --> <xsl:param name="toc.section.depth">3</xsl:param> <!-- Dot and Whitespace as separator in TOC between Label and Title--> <xsl:param name="autotoc.label.separator" select="'. '"/> <!--################################################### Paper & Page Size ################################################### --> <!-- Paper type, no headers on blank pages, no double sided printing --> <xsl:param name="paper.type" select="'A4'"/> <xsl:param name="double.sided">0</xsl:param> <xsl:param name="headers.on.blank.pages">0</xsl:param> <xsl:param name="footers.on.blank.pages">0</xsl:param> <!-- Space between paper border and content (chaotic stuff, don't touch) --> <xsl:param name="page.margin.top">5mm</xsl:param> <xsl:param name="region.before.extent">10mm</xsl:param> <xsl:param name="body.margin.top">10mm</xsl:param> <xsl:param name="body.margin.bottom">15mm</xsl:param> <xsl:param name="region.after.extent">10mm</xsl:param> <xsl:param name="page.margin.bottom">0mm</xsl:param> <xsl:param name="page.margin.outer">18mm</xsl:param> <xsl:param name="page.margin.inner">18mm</xsl:param> <!-- No intendation of Titles --> <xsl:param name="title.margin.left">0pc</xsl:param> <!--################################################### Fonts & Styles ################################################### --> <!-- Default Font size --> <xsl:param name="body.font.master">11</xsl:param> <!-- Line height in body text --> <xsl:param name="line-height">1.4</xsl:param> <!-- Monospaced fonts are smaller than regular text --> <xsl:attribute-set name="monospace.properties"> <xsl:attribute name="font-family"> <xsl:value-of select="$monospace.font.family"/> </xsl:attribute> <xsl:attribute name="font-size">0.8em</xsl:attribute> </xsl:attribute-set> <!--################################################### Tables ################################################### --> <!-- The table width should be adapted to the paper size --> <xsl:param name="default.table.width">17.4cm</xsl:param> <!-- Some padding inside tables --> <xsl:attribute-set name="table.cell.padding"> <xsl:attribute name="padding-left">4pt</xsl:attribute> <xsl:attribute name="padding-right">4pt</xsl:attribute> <xsl:attribute name="padding-top">4pt</xsl:attribute> <xsl:attribute name="padding-bottom">4pt</xsl:attribute> </xsl:attribute-set> <!-- Only hairlines as frame and cell borders in tables --> <xsl:param name="table.frame.border.thickness">0.1pt</xsl:param> <xsl:param name="table.cell.border.thickness">0.1pt</xsl:param> <!--################################################### Labels ################################################### --> <!-- Label Chapters and Sections (numbering) --> <xsl:param name="chapter.autolabel">1</xsl:param> <xsl:param name="section.autolabel" select="1"/> <xsl:param name="section.label.includes.component.label" select="1"/> <!--################################################### Titles ################################################### --> <!-- Chapter title size --> <xsl:attribute-set name="chapter.titlepage.recto.style"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.8"/> <xsl:text>pt</xsl:text> </xsl:attribute> </xsl:attribute-set> <!-- Why is the font-size for chapters hardcoded in the XSL FO templates? Let's remove it, so this sucker can use our attribute-set only... --> <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/> </xsl:call-template> </fo:block> </xsl:template> <!-- Sections 1, 2 and 3 titles have a small bump factor and padding --> <xsl:attribute-set name="section.title.level1.properties"> <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.5"/> <xsl:text>pt</xsl:text> </xsl:attribute> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.title.level2.properties"> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.6em</xsl:attribute> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.25"/> <xsl:text>pt</xsl:text> </xsl:attribute> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.title.level3.properties"> <xsl:attribute name="space-before.optimum">0.4em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.4em</xsl:attribute> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.0"/> <xsl:text>pt</xsl:text> </xsl:attribute> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute> </xsl:attribute-set> <!-- Titles of formal objects (tables, examples, ...) --> <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master"/> <xsl:text>pt</xsl:text> </xsl:attribute> <xsl:attribute name="hyphenate">false</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> </xsl:attribute-set> <!--################################################### Programlistings ################################################### --> <!-- Verbatim text formatting (programlistings) --> <xsl:attribute-set name="verbatim.properties"> <xsl:attribute name="space-before.minimum">1em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">1em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute> <xsl:attribute name="border-color">#444444</xsl:attribute> <xsl:attribute name="border-style">solid</xsl:attribute> <xsl:attribute name="border-width">0.1pt</xsl:attribute> <xsl:attribute name="padding-top">0.5em</xsl:attribute> <xsl:attribute name="padding-left">0.5em</xsl:attribute> <xsl:attribute name="padding-right">0.5em</xsl:attribute> <xsl:attribute name="padding-bottom">0.5em</xsl:attribute> <xsl:attribute name="margin-left">0.5em</xsl:attribute> <xsl:attribute name="margin-right">0.5em</xsl:attribute> </xsl:attribute-set> <!-- Shade (background) programlistings --> <xsl:param name="shade.verbatim">1</xsl:param> <xsl:attribute-set name="shade.verbatim.style"> <xsl:attribute name="background-color">#F0F0F0</xsl:attribute> </xsl:attribute-set> <!--################################################### Callouts ################################################### --> <!-- Use images for callouts instead of (1) (2) (3) --> <xsl:param name="callout.graphics">0</xsl:param> <xsl:param name="callout.unicode">1</xsl:param> <!-- Place callout marks at this column in annotated areas --> <xsl:param name="callout.defaultcolumn">90</xsl:param> <!--################################################### Admonitions ################################################### --> <!-- Use nice graphics for admonitions --> <xsl:param name="admon.graphics">'1'</xsl:param> <xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param> <!--################################################### Misc ################################################### --> <!-- Placement of titles --> <xsl:param name="formal.title.placement"> figure after example before equation before table before procedure before </xsl:param> <!-- Format Variable Lists as Blocks (prevents horizontal overflow) --> <xsl:param name="variablelist.as.blocks">1</xsl:param> <!-- The horrible list spacing problems --> <xsl:attribute-set name="list.block.spacing"> <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute> </xsl:attribute-set> </xsl:stylesheet> --- NEW FILE: html_chunk.xsl --- <?xml version="1.0"?> <!-- This is the XSL HTML configuration file for the Hibernate Reference Documentation. It took me days to figure out this stuff and fix most of the obvious bugs in the DocBook XSL distribution, so if you use this stylesheet, give some credit back to the Hibernate project. chr...@bl... --> <!DOCTYPE xsl:stylesheet [ <!ENTITY db_xsl_path "../lib/docbook-xsl/"> <!ENTITY callout_gfx_path "../images/callouts/"> <!ENTITY admon_gfx_path "../images/admons/"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default"> <xsl:import href="&db_xsl_path;/html/chunk.xsl"/> <!--################################################### HTML Settings ################################################### --> <xsl:param name="chunk.section.depth">'5'</xsl:param> <xsl:param name="use.id.as.filename">'1'</xsl:param> <xsl:param name="html.stylesheet">../styles/html.css</xsl:param> <!-- These extensions are required for table printing and other stuff --> <xsl:param name="use.extensions">1</xsl:param> <xsl:param name="tablecolumns.extension">0</xsl:param> <xsl:param name="callout.extensions">1</xsl:param> <xsl:param name="graphicsize.extension">0</xsl:param> <!--################################################### Table Of Contents ################################################### --> <!-- Generate the TOCs for named components only --> <xsl:param name="generate.toc"> book toc </xsl:param> <!-- Show only Sections up to level 3 in the TOCs --> <xsl:param name="toc.section.depth">3</xsl:param> <!--################################################### Labels ################################################### --> <!-- Label Chapters and Sections (numbering) --> <xsl:param name="chapter.autolabel">1</xsl:param> <xsl:param name="section.autolabel" select="1"/> <xsl:param name="section.label.includes.component.label" select="1"/> <!--################################################### Callouts ################################################### --> <!-- Use images for callouts instead of (1) (2) (3) --> <xsl:param name="callout.graphics">1</xsl:param> <xsl:param name="callout.graphics.path">&callout_gfx_path;</xsl:param> <!-- Place callout marks at this column in annotated areas --> <xsl:param name="callout.defaultcolumn">90</xsl:param> <!--################################################### Admonitions ################################################### --> <!-- Use nice graphics for admonitions --> <xsl:param name="admon.graphics">'1'</xsl:param> <xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param> <!--################################################### Misc ################################################### --> <!-- Placement of titles --> <xsl:param name="formal.title.placement"> figure after example before equation before table before procedure before </xsl:param> </xsl:stylesheet> --- NEW FILE: html.css --- A { color: #003399; } A:active { color: #003399; } A:visited { color: #888888; } P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE { color: #000000; } TD, TH, SPAN { color: #000000; } BLOCKQUOTE { margin-right: 0px; } H1, H2, H3, H4, H5, H6 { color: #000000; font-weight:500; margin-top:10px; padding-top:15px; } TABLE { border-collapse: collapse; border-spacing:0; border: 1px thin black; empty-cells: hide; } TD { padding: 4pt; } H1 { font-size: 150%; } H2 { font-size: 140%; } H3 { font-size: 110%; font-weight: bold; } H4 { font-size: 110%; font-weight: bold;} H5 { font-size: 100%; font-style: italic; } H6 { font-size: 100%; font-style: italic; } TT { font-size: 90%; font-family: "Courier New", Courier, monospace; color: #000000; } PRE { font-size: 100%; padding: 5px; border-style: solid; border-width: 1px; border-color: #CCCCCC; background-color: #F4F4F4; } UL, OL, LI { list-style: disc; } HR { width: 100%; height: 1px; background-color: #CCCCCC; border-width: 0px; padding: 0px; color: #CCCCCC; } .variablelist { padding-top: 10; padding-bottom:10; margin:0; } .itemizedlist, UL { padding-top: 0; padding-bottom:0; margin:0; } .term { font-weight:bold; } --- NEW FILE: html.xsl --- <?xml version="1.0"?> <!-- This is the XSL HTML configuration file for the Hibernate Reference Documentation. It took me days to figure out this stuff and fix most of the obvious bugs in the DocBook XSL distribution, so if you use this stylesheet, give some credit back to the Hibernate project. chr...@bl... --> <!DOCTYPE xsl:stylesheet [ <!ENTITY db_xsl_path "../lib/docbook-xsl/"> <!ENTITY callout_gfx_path "../images/callouts/"> <!ENTITY admon_gfx_path "../images/admons/"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default"> <xsl:import href="&db_xsl_path;/html/docbook.xsl"/> <!--################################################### HTML Settings ################################################### --> <xsl:param name="html.stylesheet">../styles/html.css</xsl:param> <!-- These extensions are required for table printing and other stuff --> <xsl:param name="use.extensions">1</xsl:param> <xsl:param name="tablecolumns.extension">0</xsl:param> <xsl:param name="callout.extensions">1</xsl:param> <xsl:param name="graphicsize.extension">0</xsl:param> <!--################################################### Table Of Contents ################################################### --> <!-- Generate the TOCs for named components only --> <xsl:param name="generate.toc"> book toc </xsl:param> <!-- Show only Sections up to level 3 in the TOCs --> <xsl:param name="toc.section.depth">3</xsl:param> <!--################################################### Labels ################################################### --> <!-- Label Chapters and Sections (numbering) --> <xsl:param name="chapter.autolabel">1</xsl:param> <xsl:param name="section.autolabel" select="1"/> <xsl:param name="section.label.includes.component.label" select="1"/> <!--################################################### Callouts ################################################### --> <!-- Use images for callouts instead of (1) (2) (3) --> <xsl:param name="callout.graphics">1</xsl:param> <xsl:param name="callout.graphics.path">&callout_gfx_path;</xsl:param> <!-- Place callout marks at this column in annotated areas --> <xsl:param name="callout.defaultcolumn">90</xsl:param> <!--################################################### Admonitions ################################################### --> <!-- Use nice graphics for admonitions --> <xsl:param name="admon.graphics">'1'</xsl:param> <xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param> <!--################################################### Misc ################################################### --> <!-- Placement of titles --> <xsl:param name="formal.title.placement"> figure after example before equation before table before procedure before </xsl:param> </xsl:stylesheet> |
From: <tu...@us...> - 2003-03-27 23:17:16
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/styles In directory sc8-pr-cvs1:/tmp/cvs-serv31521/doc/reference/styles Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/styles added to the repository |
From: <tu...@us...> - 2003-03-27 23:17:07
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference In directory sc8-pr-cvs1:/tmp/cvs-serv31429/doc/reference Modified Files: README Log Message: Now with Ant Index: README =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 23 Feb 2003 13:59:25 -0000 1.2 --- README 27 Mar 2003 23:17:02 -0000 1.3 *************** *** 1,8 **** ! We're using the DocBook XSL distribution for HTML and PDF generation. The best results can be achieved with the Saxon XSLT processor (don't use Xalan!) and the Apache FOP library. ! See the scripts in the bin/ directory for more information. chr...@bl... --- 1,9 ---- ! We're using the DocBook XSL distribution for HTML and PDF generation. The best results can be achieved with the Saxon XSLT processor (don't use Xalan!) and the Apache FOP library. ! The documentation is generated by the build.xml file of ! Hibernate and Ant. chr...@bl... |
From: <tu...@us...> - 2003-03-27 23:16:49
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference In directory sc8-pr-cvs1:/tmp/cvs-serv31256/doc/reference Removed Files: style.css Log Message: Moved to styles directory --- style.css DELETED --- |
From: <tu...@us...> - 2003-03-27 23:16:01
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv30837/doc/reference/src Modified Files: index.xml Log Message: Added portable system identifier and new version Index: index.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/index.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.xml 2 Mar 2003 13:59:01 -0000 1.4 --- index.xml 27 Mar 2003 23:15:57 -0000 1.5 *************** *** 1,5 **** <?xml version='1.0' encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" ! "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd" [ <!ENTITY architecture SYSTEM "architecture.xml"> --- 1,5 ---- <?xml version='1.0' encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" ! "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ <!ENTITY architecture SYSTEM "architecture.xml"> *************** *** 21,25 **** <title>HIBERNATE - Relational Persistence for Idiomatic Java</title> <subtitle>Reference Documentation</subtitle> ! <releaseinfo>2.0 beta4</releaseinfo> </bookinfo> --- 21,25 ---- <title>HIBERNATE - Relational Persistence for Idiomatic Java</title> <subtitle>Reference Documentation</subtitle> ! <releaseinfo>2.0beta5</releaseinfo> </bookinfo> |
From: <tu...@us...> - 2003-03-27 23:15:37
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src/xsl In directory sc8-pr-cvs1:/tmp/cvs-serv30564/doc/reference/src/xsl Removed Files: fopdf.xsl html.xsl html_chunk.xsl Log Message: Moved to styles directory --- fopdf.xsl DELETED --- --- html.xsl DELETED --- --- html_chunk.xsl DELETED --- |
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib In directory sc8-pr-cvs1:/tmp/cvs-serv27022/doc/reference/lib Added Files: avalon-framework-cvs-20020806.jar batik.jar fop.jar jai_codec.jar jai_core.jar saxon-dbxsl-extensions.jar saxon.jar Log Message: All Java libraries for doco generation --- NEW FILE: avalon-framework-cvs-20020806.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: batik.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fop.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jai_codec.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: jai_core.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: saxon-dbxsl-extensions.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: saxon.jar --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/html In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl/html Added Files: ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl division.xsl docbook.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl html-rtf.xsl html.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.ent param.xml param.xsl param.xweb pi.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xml titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl Log Message: DocBook XSL now in CVS --- NEW FILE: ChangeLog --- 2003-01-22 Norman Walsh <nw...@us...> * graphics.xsl: Fix bugs in presentation of graphic width/height * inline.xsl: Add class attributes to inline elements * xref.xsl: Format chapter and appendix titles consistently in xrefs 2003-01-20 Norman Walsh <nw...@us...> * autoidx.xsl: Bug #663331: add article to section entity * biblio.xsl: Bug #640762: Support new biblioentry elements * chunk-common.xsl: Bug #648473: don't output the html.ext when using dbhtml filenames * footnote.xsl: Support {table.}footnote.number.{format,symbols} * glossary.xsl: Support glossentry.show.acronym [...1448 lines suppressed...] * callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters * chunk-common.xsl: Remove unnecessary xmlns declarations * chunker.xsl: Patch to make saxon not produce xml version=1.1 documents * param.xsl: Documentation fixes * qandaset.xsl: Apply patch 412510 by Jon Willeke, make xref to Question work correctly * xref.xsl: Remove unnecessary parameter assignment 2001-04-02 Norman Walsh <nw...@us...> * .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl, xtchunk.xsl, xtchunker.xsl: New file. * Makefile: Use the cvstools version of saxon --- NEW FILE: admon.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: admon.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <xsl:template name="admon.graphic.width"> <xsl:param name="node" select="."/> <xsl:text>25</xsl:text> </xsl:template> <xsl:template match="note|important|warning|caution|tip"> <xsl:choose> <xsl:when test="$admon.graphics != 0"> <xsl:call-template name="graphical.admonition"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="nongraphical.admonition"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="admon.graphic"> <xsl:param name="node" select="."/> <xsl:value-of select="$admon.graphics.path"/> <xsl:choose> <xsl:when test="local-name($node)='note'">note</xsl:when> <xsl:when test="local-name($node)='warning'">warning</xsl:when> <xsl:when test="local-name($node)='caution'">caution</xsl:when> <xsl:when test="local-name($node)='tip'">tip</xsl:when> <xsl:when test="local-name($node)='important'">important</xsl:when> <xsl:otherwise>note</xsl:otherwise> </xsl:choose> <xsl:value-of select="$admon.graphics.extension"/> </xsl:template> <xsl:template name="graphical.admonition"> <xsl:variable name="admon.type"> <xsl:choose> <xsl:when test="local-name(.)='note'">Note</xsl:when> <xsl:when test="local-name(.)='warning'">Warning</xsl:when> <xsl:when test="local-name(.)='caution'">Caution</xsl:when> <xsl:when test="local-name(.)='tip'">Tip</xsl:when> <xsl:when test="local-name(.)='important'">Important</xsl:when> <xsl:otherwise>Note</xsl:otherwise> </xsl:choose> </xsl:variable> <div class="{name(.)}"> <xsl:if test="$admon.style != ''"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> </xsl:if> <table border="0"> <xsl:attribute name="summary"> <xsl:value-of select="$admon.type"/> <xsl:if test="title"> <xsl:text>: </xsl:text> <xsl:value-of select="title"/> </xsl:if> </xsl:attribute> <tr> <td rowspan="2" align="center" valign="top"> <xsl:attribute name="width"> <xsl:call-template name="admon.graphic.width"/> </xsl:attribute> <img alt="[{$admon.type}]"> <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> </img> </td> <th align="left"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="object.title.markup"/> </th> </tr> <tr> <td colspan="2" align="left" valign="top"> <xsl:apply-templates/> </td> </tr> </table> </div> </xsl:template> <xsl:template name="nongraphical.admonition"> <div class="{name(.)}"> <xsl:if test="$admon.style"> <xsl:attribute name="style"> <xsl:value-of select="$admon.style"/> </xsl:attribute> </xsl:if> <h3 class="title"> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="object.title.markup"/> </h3> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="note/title"></xsl:template> <xsl:template match="important/title"></xsl:template> <xsl:template match="warning/title"></xsl:template> <xsl:template match="caution/title"></xsl:template> <xsl:template match="tip/title"></xsl:template> </xsl:stylesheet> --- NEW FILE: autoidx.xsl --- <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> <!ENTITY section '(ancestor-or-self::set |ancestor-or-self::book |ancestor-or-self::part |ancestor-or-self::reference |ancestor-or-self::partintro |ancestor-or-self::chapter |ancestor-or-self::appendix |ancestor-or-self::preface |ancestor-or-self::article |ancestor-or-self::section |ancestor-or-self::sect1 |ancestor-or-self::sect2 |ancestor-or-self::sect3 |ancestor-or-self::sect4 |ancestor-or-self::sect5 |ancestor-or-self::refentry |ancestor-or-self::refsect1 |ancestor-or-self::refsect2 |ancestor-or-self::refsect3 |ancestor-or-self::simplesect |ancestor-or-self::bibliography |ancestor-or-self::glossary |ancestor-or-self::index |ancestor-or-self::webpage)[last()]'> <!ENTITY section.id 'generate-id(§ion;)'> <!ENTITY sep '" "'> <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- ==================================================================== --> <!-- Jeni Tennison gets all the credit for what follows. I think I understand it :-) Anyway, I've hacked it a bit, so the bugs are mine. --> <xsl:key name="letter" match="indexterm" use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:key name="primary" match="indexterm" use="&primary;"/> <xsl:key name="secondary" match="indexterm" use="concat(&primary;, &sep;, &secondary;)"/> <xsl:key name="tertiary" match="indexterm" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:key name="endofrange" match="indexterm[@class='endofrange']" use="@startref"/> <xsl:key name="primary-section" match="indexterm[not(secondary) and not(see)]" use="concat(&primary;, &sep;, §ion.id;)"/> <xsl:key name="secondary-section" match="indexterm[not(tertiary) and not(see)]" use="concat(&primary;, &sep;, &secondary;, &sep;, §ion.id;)"/> <xsl:key name="tertiary-section" match="indexterm[not(see)]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, §ion.id;)"/> <xsl:key name="see-also" match="indexterm[seealso]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/> <xsl:key name="see" match="indexterm[see]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/> <xsl:key name="sections" match="*[@id]" use="@id"/> <xsl:template name="generate-index"> <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> <xsl:variable name="terms" select="//indexterm[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;, &uppercase;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/> <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <div class="index"> <xsl:if test="$others"> <div class="indexdiv"> <h3> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'index symbols'"/> </xsl:call-template> </h3> <dl> <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-symbol-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </div> </xsl:if> <xsl:apply-templates select="$alphabetical[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </div> </xsl:template> <xsl:template match="indexterm" mode="index-div"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <!-- Make sure that we don't generate a div if there are no terms in scope --> <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <div class="indexdiv"> <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> <h3> <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> </h3> </xsl:if> <dl> <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </div> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-symbol-div"> <xsl:param name="scope" select="/"/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1), &lowercase;,&uppercase;)"/> <xsl:apply-templates select="key('letter', $key) [count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:template> <xsl:template match="indexterm" mode="index-primary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="&primary;"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <dt> <xsl:value-of select="primary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(secondary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <dt> <xsl:value-of select="secondary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(tertiary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" mode="index-tertiary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <dt> <xsl:value-of select="tertiary"/> <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs/see"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </dt> <xsl:if test="$refs/seealso"> <dd> <dl> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </dl> </dd> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference"> <xsl:param name="scope" select="."/> <xsl:param name="separator" select="', '"/> <xsl:value-of select="$separator"/> <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <a> <xsl:variable name="title"> <xsl:apply-templates select="§ion;" mode="title.markup"/> </xsl:variable> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="§ion;"/> </xsl:call-template> </xsl:attribute> <xsl:value-of select="$title"/> <!-- text only --> </a> <xsl:if test="key('endofrange', @id)[&scope;]"> <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]" mode="reference"> <xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="separator" select="'-'"/> </xsl:apply-templates> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference"> <xsl:param name="scope" select="."/> <xsl:param name="zones"/> <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$target[1]" mode="index-title-content"/> </a> <xsl:text>, </xsl:text> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$target[1]" mode="index-title-content"/> </a> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="indexterm" mode="index-see"> <xsl:param name="scope" select="."/> <xsl:text> (</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'see'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="see"/> <xsl:text>)</xsl:text> </xsl:template> <xsl:template match="indexterm" mode="index-seealso"> <xsl:param name="scope" select="."/> <dt> <xsl:text>(</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'seealso'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="seealso"/> <xsl:text>)</xsl:text> </dt> </xsl:template> <xsl:template match="*" mode="index-title-content"> <xsl:variable name="title"> <xsl:apply-templates select="§ion;" mode="title.markup"/> </xsl:variable> <xsl:value-of select="$title"/> </xsl:template> </xsl:stylesheet> --- NEW FILE: autotoc.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: autotoc.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <xsl:variable name="toc.listitem.type"> <xsl:choose> <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when> <xsl:otherwise>li</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- this is just hack because dl and ul aren't completely isomorphic --> <xsl:variable name="toc.dd.type"> <xsl:choose> <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:template name="make.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/> <xsl:variable name="toc.title"> <xsl:if test="$toc.title.p"> <p> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key">TableofContents</xsl:with-param> </xsl:call-template> </b> </p> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="$manual.toc != ''"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="toc" select="document($manual.toc, .)"/> <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/> <xsl:if test="$tocentry and $tocentry/*"> <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> </xsl:element> </div> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:if test="$nodes"> <div class="toc"> <xsl:copy-of select="$toc.title"/> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </div> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="make.lots"> <xsl:param name="toc.params" select="''"/> <xsl:param name="toc"/> <xsl:if test="contains($toc.params, 'toc')"> <xsl:copy-of select="$toc"/> </xsl:if> <xsl:if test="contains($toc.params, 'figure')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> <xsl:with-param name="nodes" select=".//figure"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'table')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> <xsl:with-param name="nodes" select=".//table"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'example')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'example'"/> <xsl:with-param name="nodes" select=".//example"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'equation')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'equation'"/> <xsl:with-param name="nodes" select=".//equation[title]"/> </xsl:call-template> </xsl:if> <xsl:if test="contains($toc.params, 'procedure')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'procedure'"/> <xsl:with-param name="nodes" select=".//procedure[title]"/> </xsl:call-template> </xsl:if> </xsl:template> <!-- ====================================================================== --> <xsl:template name="set.toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="book|setindex"/> </xsl:call-template> </xsl:template> <xsl:template name="division.toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="component.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="toc.title.p" select="$toc.title.p"/> <xsl:with-param name="nodes" select="section|sect1|refentry |article|bibliography|glossary |appendix |bridgehead[not(@renderas) and $bridgehead.in.toc != 0] |.//bridgehead[@renderas='sect1' and $bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="component.toc.separator"> <!-- Customize to output something between component.toc and first output --> </xsl:template> <xsl:template name="section.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:call-template name="make.toc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="toc.title.p" select="$toc.title.p"/> <xsl:with-param name="nodes" select="section|sect1|sect2|sect3|sect4|sect5|refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template name="section.toc.separator"> <!-- Customize to output something between section.toc and first output --> </xsl:template> <!-- ==================================================================== --> <xsl:template name="subtoc"> <xsl:param name="toc-context" select="."/> <xsl:param name="nodes" select="NOT-AN-ELEMENT"/> <xsl:variable name="subtoc"> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates mode="toc" select="$nodes"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </xsl:variable> <xsl:variable name="depth"> <xsl:choose> <xsl:when test="local-name(.) = 'section'"> <xsl:value-of select="count(ancestor::section) + 1"/> </xsl:when> <xsl:when test="local-name(.) = 'sect1'">1</xsl:when> <xsl:when test="local-name(.) = 'sect2'">2</xsl:when> <xsl:when test="local-name(.) = 'sect3'">3</xsl:when> <xsl:when test="local-name(.) = 'sect4'">4</xsl:when> <xsl:when test="local-name(.) = 'sect5'">5</xsl:when> <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when> <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when> <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when> <xsl:when test="local-name(.) = 'simplesect'"> <!-- sigh... --> <xsl:choose> <xsl:when test="local-name(..) = 'section'"> <xsl:value-of select="count(ancestor::section)"/> </xsl:when> <xsl:when test="local-name(..) = 'sect1'">2</xsl:when> <xsl:when test="local-name(..) = 'sect2'">3</xsl:when> <xsl:when test="local-name(..) = 'sect3'">4</xsl:when> <xsl:when test="local-name(..) = 'sect4'">5</xsl:when> <xsl:when test="local-name(..) = 'sect5'">6</xsl:when> <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when> <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when> <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="subtoc.list"> <xsl:choose> <xsl:when test="$toc.dd.type = ''"> <xsl:copy-of select="$subtoc"/> </xsl:when> <xsl:otherwise> <xsl:element name="{$toc.dd.type}"> <xsl:copy-of select="$subtoc"/> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="context" select="$toc-context"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="." mode="title.markup"/> </a> <xsl:if test="$toc.listitem.type = 'li' and $toc.section.depth > $depth and count($nodes)>0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:element> <xsl:if test="$toc.listitem.type != 'li' and $toc.section.depth > $depth and count($nodes)>0"> <xsl:copy-of select="$subtoc.list"/> </xsl:if> </xsl:template> <xsl:template match="book|setindex" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="part|reference" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="appendix|chapter|article |index|glossary|bibliography |preface|reference|refentry |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="preface|chapter|appendix|article" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="section|sect1 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect1" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect2 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect2" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect3 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect3" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect4 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect4" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="sect5 |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="sect5" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:template> <xsl:template match="section" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="section |bridgehead[$bridgehead.in.toc != 0]"/> </xsl:call-template> </xsl:template> <xsl:template match="bridgehead" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:if test="$bridgehead.in.toc != 0"> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="bibliography|glossary" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:template> <xsl:template match="index" mode="toc"> <xsl:param name="toc-context" select="."/> <!-- If the index tag is empty, don't point at it from the TOC --> <xsl:if test="* or $generate.index"> <xsl:call-template name="subtoc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="refentry" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="refmeta" select=".//refmeta"/> <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/> <xsl:variable name="refnamediv" select=".//refnamediv"/> <xsl:variable name="refname" select="$refnamediv//refname"/> <xsl:variable name="title"> <xsl:choose> <xsl:when test="$refentrytitle"> <xsl:apply-templates select="$refentrytitle[1]" mode="title.markup"/> </xsl:when> <xsl:when test="$refname"> <xsl:apply-templates select="$refname[1]" mode="title.markup"/> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="{$toc.listitem.type}"> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:copy-of select="$title"/> </a> <xsl:if test="$annotate.toc != 0"> <xsl:text> - </xsl:text> <xsl:value-of select="refnamediv/refpurpose"/> </xsl:if> </xsl:element> </xsl:template> <xsl:template match="title" mode="toc"> <xsl:param name="toc-context" select="."/> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select=".."/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates/> </a> </xsl:template> <xsl:template name="manual-toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="tocentry"/> <!-- be careful, we don't want to change the current document to the other tree! --> <xsl:if test="$tocentry"> <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="$node" mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$node"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="$node" mode="title.markup"/> </a> </xsl:element> <xsl:if test="$tocentry/*"> <xsl:element name="{$toc.list.type}"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/*[1]"/> </xsl:call-template> </xsl:element> </xsl:if> <xsl:if test="$tocentry/following-sibling::*"> <xsl:call-template name="manual-toc"> <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template name="list.of.titles"> <xsl:param name="toc-context" select="."/> <xsl:param name="titles" select="'table'"/> <xsl:param name="nodes" select=".//table"/> <xsl:if test="$nodes"> <div class="list-of-{$titles}s"> <p> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key"> <xsl:choose> <xsl:when test="$titles='table'">ListofTables</xsl:when> <xsl:when test="$titles='figure'">ListofFigures</xsl:when> <xsl:when test="$titles='equation'">ListofEquations</xsl:when> <xsl:when test="$titles='example'">ListofExamples</xsl:when> <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when> <xsl:otherwise>ListofUnknown</xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </b> </p> <xsl:element name="{$toc.list.type}"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </xsl:element> </div> </xsl:if> </xsl:template> <xsl:template match="figure|table|example|equation|procedure" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:element name="{$toc.listitem.type}"> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <xsl:copy-of select="$label"/> <xsl:if test="$label != ''"> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <a> <xsl:attribute name="href"> <xsl:call-template name="href.target"/> </xsl:attribute> <xsl:apply-templates select="." mode="title.markup"/> </a> </xsl:element> </xsl:template> </xsl:stylesheet> --- NEW FILE: biblio.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: biblio.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template match="bibliography"> <div class="{name(.)}"> <xsl:if test="$generate.id.attributes != 0"> [...1016 lines suppressed...] <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <xsl:template match="volumenum" mode="bibliomixed.mode"> <span class="{name(.)}"> <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" mode="bibliomixed.mode"> <span class="{name(.)}"> <xsl:apply-templates mode="bibliomixed.mode"/> </span> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: block.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <!-- ******************************************************************** $Id: block.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template name="block.object"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> <!-- ==================================================================== --> <xsl:template match="para"> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <xsl:if test="position() = 1 and parent::listitem"> <xsl:call-template name="anchor"> <xsl:with-param name="node" select="parent::listitem"/> </xsl:call-template> </xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="paragraph"> <xsl:param name="class" select="''"/> <xsl:param name="content"/> <xsl:variable name="p"> <p> <xsl:if test="$class != ''"> <xsl:attribute name="class"> <xsl:value-of select="$class"/> </xsl:attribute> </xsl:if> <xsl:copy-of select="$content"/> </p> </xsl:variable> <xsl:choose> <xsl:when test="$html.cleanup != 0"> <xsl:call-template name="unwrap.p"> <xsl:with-param name="p" select="$p"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$p"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="simpara"> <!-- see also listitem/simpara in lists.xsl --> <p> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:attribute name="class"> <xsl:value-of select="@role"/> </xsl:attribute> </xsl:if> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="formalpara"> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="formalpara/title"> <xsl:variable name="titleStr" select="."/> <xsl:variable name="lastChar"> <xsl:if test="$titleStr != ''"> <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/> </xsl:if> </xsl:variable> <b> <xsl:apply-templates/> <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))"> <xsl:value-of select="$runinhead.default.title.end.punct"/> </xsl:if> <xsl:text> </xsl:text> </b> </xsl:template> <xsl:template match="formalpara/para"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="blockquote"> <div class="{local-name(.)}"> <xsl:if test="@lang or @xml:lang"> <xsl:call-template name="language.attribute"/> </xsl:if> <xsl:call-template name="anchor"/> <xsl:choose> <xsl:when test="attribution"> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="blockquote" summary="Block quote"> <tr> <td width="10%" valign="top"> </td> <td width="80%" valign="top"> <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/> </td> <td width="10%" valign="top"> </td> </tr> <tr> <td colspan="2" align="right" valign="top"> <xsl:text>--</xsl:text> <xsl:apply-templates select="attribution"/> </td> <td width="10%" valign="top"> </td> </tr> </table> </xsl:when> <xsl:otherwise> <blockquote class="{local-name(.)}"> <xsl:apply-templates/> </blockquote> </xsl:otherwise> </xsl:choose> </div> </xsl:template> <xsl:template match="blockquote/title"> <div class="blockquote-title"> <p> <b> <xsl:apply-templates/> </b> </p> </div> </xsl:template> <xsl:template match="epigraph"> <div class="{name(.)}"> <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> <span>--<xsl:apply-templates select="attribution"/></span> </div> </xsl:template> <xsl:template match="attribution"> <span class="{name(.)}"><xsl:apply-templates/></span> </xsl:template> <!-- ==================================================================== --> <xsl:template match="sidebar"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="sidebar/title"> <p class="title"> <b><xsl:apply-templates/></b> </p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="abstract"> <div class="{name(.)}"> <xsl:call-template name="anchor"/> <xsl:call-template name="formal.object.heading"> <xsl:with-param name="title"> <xsl:apply-templates select="." mode="title.markup"> <xsl:with-param name="allow-anchors" select="'1'"/> </xsl:apply-templates> </xsl:with-param> </xsl:call-template> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="abstract/title"> </xsl:template> <!-- ==================================================================== --> <xsl:template match="msgset"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgentry"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="simplemsgentry"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msg"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msgmain"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgmain/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgsub"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgsub/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgrel"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msgrel/title"> <b><xsl:apply-templates/></b> </xsl:template> <xsl:template match="msgtext"> <xsl:apply-templates/> </xsl:template> <xsl:template match="msginfo"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msglevel"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgLevel'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgorig"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgOrig'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgaud"> <p> <b> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'msgset'"/> <xsl:with-param name="name" select="'MsgAud'"/> </xsl:call-template> </b> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="msgexplan"> <xsl:call-template name="block.object"/> </xsl:template> <xsl:template match="msgexplan/title"> <p><b><xsl:apply-templates/></b></p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="revhistory"> <div class="{name(.)}"> <table border="0" width="100%" summary="Revision history"> <tr> <th align="left" valign="top" colspan="3"> <b> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RevHistory'"/> </xsl:call-template> </b> </th> </tr> <xsl:apply-templates/> </table> </div> </xsl:template> <xsl:template match="revhistory/revision"> <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <tr> <td align="left"> <xsl:if test="$revnumber"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'Revision'"/> </xsl:call-template> <xsl:call-template name="gentext.space"/> <xsl:apply-templates select="$revnumber"/> </xsl:if> </td> <td align="left"> <xsl:apply-templates select="$revdate"/> </td> <xsl:choose> <xsl:when test="count($revauthor)=0"> <td align="left"> <xsl:call-template name="dingbat"> <xsl:with-param name="dingbat">nbsp</xsl:with-param> </xsl:call-template> </td> </xsl:when> <xsl:otherwise> <td align="left"> <xsl:apply-templates select="$revauthor"/> </td> </xsl:otherwise> </xsl:choose> </tr> <xsl:if test="$revremark"> <tr> <td align="left" colspan="3"> <xsl:apply-templates select="$revremark"/> </td> </tr> </xsl:if> </xsl:template> <xsl:template match="revision/revnumber"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/date"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/authorinitials"> <xsl:text>, </xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/authorinitials[1]" priority="2"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/revremark"> <xsl:apply-templates/> </xsl:template> <xsl:template match="revision/revdescription"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="ackno"> <p class="{name(.)}"> <xsl:apply-templates/> </p> </xsl:template> <!-- ==================================================================== --> <xsl:template match="highlights"> <xsl:call-template name="block.object"/> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: callout.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" exclude-result-prefixes="sverb xverb lxslt" version='1.0'> <!-- ******************************************************************** $Id: callout.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <lxslt:component prefix="xverb" functions="insertCallouts"/> <xsl:template match="programlistingco|screenco"> <xsl:variable name="verbatim" select="programlisting|screen"/> <xsl:choose> <xsl:when test="$use.extensions != '0' and $callouts.extension != '0'"> <xsl:variable name="rtf"> <xsl:apply-templates select="$verbatim"> <xsl:with-param name="suppress-numbers" select="'1'"/> </xsl:apply-templates> </xsl:variable> <xsl:variable name="rtf-with-callouts"> <xsl:choose> <xsl:when test="function-available('sverb:insertCallouts')"> <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/> </xsl:when> <xsl:when test="function-available('xverb:insertCallouts')"> <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No insertCallouts function is available.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$verbatim/@linenumbering = 'numbered' and $linenumbering.extension != '0'"> <div class="{name(.)}"> <xsl:call-template name="number.rtf.lines"> <xsl:with-param name="rtf" select="$rtf-with-callouts"/> <xsl:with-param name="pi.context" select="programlisting|screen"/> </xsl:call-template> <xsl:apply-templates select="calloutlist"/> </div> </xsl:when> <xsl:otherwise> <div class="{name(.)}"> <xsl:copy-of select="$rtf-with-callouts"/> <xsl:apply-templates select="calloutlist"/> </div> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <div class="{name(.)}"> <xsl:apply-templates/> </div> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="areaspec|areaset|area"> </xsl:template> <xsl:template match="areaset" mode="conumber"> <xsl:number count="area|areaset" format="1"/> </xsl:template> <xsl:template match="area" mode="conumber"> <xsl:number count="area|areaset" format="1"/> </xsl:template> <xsl:template match="co"> <!-- Support a single linkend in HTML --> <xsl:variable name="targets" select="key('id', @linkends)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> <xsl:when test="$target"> <a> <xsl:if test="@id"> <xsl:attribute name="name"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:attribute name="href"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="$target"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="." mode="callout-bug"/> </a> </xsl:when> <xsl:otherwise> <xsl:call-template name="anchor"/> <xsl:apply-templates select="." mode="callout-bug"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="co" mode="callout-bug"> <xsl:call-template name="callout-bug"> <xsl:with-param name="conum"> <xsl:number count="co" format="1"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="callout-bug"> <xsl:param name="conum" select='1'/> <xsl:choose> <xsl:when test="$callout.graphics != 0 and $conum <= $callout.graphics.number.limit"> <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}" alt="{$conum}" border="0"/> </xsl:when> <xsl:when test="$callout.unicode != 0 and $conum <= $callout.unicode.number.limit"> <xsl:choose> <xsl:when test="$callout.unicode.start.character = 10102"> <xsl:choose> <xsl:when test="$conum = 1">❶</xsl:when> <xsl:when test="$conum = 2">❷</xsl:when> <xsl:when test="$conum = 3">❸</xsl:when> <xsl:when test="$conum = 4">❹</xsl:when> <xsl:when test="$conum = 5">❺</xsl:when> <xsl:when test="$conum = 6">❻</xsl:when> <xsl:when test="$conum = 7">❼</xsl:when> <xsl:when test="$conum = 8">❽</xsl:when> <xsl:when test="$conum = 9">❾</xsl:when> <xsl:when test="$conum = 10">❿</xsl:when> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Don't know how to generate Unicode callouts </xsl:text> <xsl:text>when $callout.unicode.start.character is </xsl:text> <xsl:value-of select="$callout.unicode.start.character"/> </xsl:message> <xsl:text>(</xsl:text> <xsl:value-of select="$conum"/> <xsl:text>)</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:text>(</xsl:text> <xsl:value-of selec... [truncated message content] |
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/common In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl/common Added Files: ChangeLog af.xml bg.xml ca.xml common.xsl cs.xml da.xml de.xml el.xml en.xml es.xml et.xml eu.xml fi.xml fr.xml gentext.xsl he.xml hu.xml id.xml it.xml ja.xml ko.xml l10n.dtd l10n.xml l10n.xsl labels.xsl lt.xml nl.xml nn.xml no.xml pl.xml pt.xml pt_br.xml ro.xml ru.xml sk.xml sl.xml sr.xml subtitles.xsl sv.xml table.xsl targetdatabase.dtd targets.xsl th.xml titles.xsl tr.xml uk.xml vi.xml xh.xml zh_cn.xml zh_tw.xml Log Message: DocBook XSL now in CVS --- NEW FILE: ChangeLog --- 2003-01-23 Adam Di Carlo <adi...@us...> * Makefile: make use of cvstools/Makefile.incl 2003-01-20 Norman Walsh <nw...@us...> * gentext.xsl: Added object.titleabbrev.markup for consistency * gentext.xsl: Support experimental parameter to specify that number-and-title xrefs should be used even when things are numbered * l10n.xsl: Added gentext.template.exists to test if a gentext template exists. Clever name, huh? * titles.xsl: Expanded support for obtaining titleabbrevs 2003-01-10 Norman Walsh <nw...@us...> * .cvsignore, l10n.xml: Added bg.xml * Makefile: Add Bulgarian 2003-01-02 Norman Walsh <nw...@us...> * labels.xsl, titles.xsl: Support setindex (there were all sorts of things wrong with it) 2003-01-01 Norman Walsh <nw...@us...> * table.xsl: CALS says the default for colsep and rowsep is 1. * table.xsl: Fix variable scoping problem * titles.xsl: Support titleabbrev (outside of info elements anyway) 2002-12-18 Robert Stayton <bob...@us...> * common.xsl: The select.mediaobject.index template now uses the $stylesheet.result.type parameter to choose the role value, with xhtml falling back to html if needed. 2002-12-17 Robert Stayton <bob...@us...> * common.xsl: Changed selection of mediaobject to be more consistent using a separate select.mediaobject.index template. Also added text-align to block containing external-graphic in fo output. 2002-11-23 Robert Stayton <bob...@us...> * common.xsl: Fixed bug in orderedlist-starting-number test when @continuation not set. 2002-11-14 Norman Walsh <nw...@us...> * common.xsl: Handle nested refsections in section.level * gentext.xsl: Pass full xpath name to gentext.template instead of just the local-name * l10n.xsl: Make gentext.template search through /-separated names 2002-10-19 Norman Walsh <nw...@us...> * l10n.xsl: Support output of language attribute 2002-10-09 Norman Walsh <nw...@us...> * l10n.xsl: Make 3166 language codes work in upper or lowercase 2002-10-02 Norman Walsh <nw...@us...> * common.xsl: Added orderedlist-starting-number and orderedlist-item-number templates 2002-10-01 Robert Stayton <bob...@us...> * common.xsl: Changed the section.level template to return a number that matches the section level (sect1 = 1, etc.). 2002-09-27 Norman Walsh <nw...@us...> * l10n.xml: Add Thai 2002-09-15 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Added LT and VI localizations 2002-09-04 Norman Walsh <nw...@us...> * common.xsl: Refactor person.name templates so that it's easy to override them * l10n.xsl: Move l10n.* parameters into ../params so they can be properly documented; made l10n.gentext.use.xref.language a numeric boolean parameter instead of a proper boolean 2002-09-03 Norman Walsh <nw...@us...> * common.xsl: Remove spurious character on line 432 * table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells 2002-09-02 Norman Walsh <nw...@us...> * common.xsl: Support person-name style from localization data in personal names 2002-08-28 Norman Walsh <nw...@us...> * table.xsl: Make inherited attributes work for 'missing' table cells 2002-07-29 Robert Stayton <bob...@us...> * targetdatabase.dtd: Changed the targetptr attribute from #REQUIRED to #IMPLIED since it is not required on all objects. * targetdatabase.dtd: Forgot to fix the attribute on the <obj> element as well. * targetdatabase.dtd: Replaced targetid attribute on document with targetptr per the decision of the DocBook Technical Committee. 2002-07-17 Norman Walsh <nw...@us...> * labels.xsl: Don't count equations without titles when labelling equations * labels.xsl: Fixed thinko 2002-07-13 Robert Stayton <bob...@us...> * targets.xsl: Fixed output encoding to utf-8 so a targets database can handle mixed languages. Added omit-xml-declaration to get around the standalone attribute in the XML declaration not being permitted in system entities. 2002-07-09 Norman Walsh <nw...@us...> * labels.xsl: Bug #558333: use containing section for the label of a bridgehead if section.autolabel is non-zero 2002-07-07 Robert Stayton <bob...@us...> * common.xsl: Changed the name of the second-order itemizedlist mark from 'round' (not supported in browsers' <ul> 'type' attribute) to 'circle', which is supported. Both are already supported in FO stylesheet. 2002-07-06 Norman Walsh <nw...@us...> * targets.xsl: The default.encoding parameter has been renamed chunker.output.encoding 2002-07-05 Robert Stayton <bob...@us...> * labels.xsl, titles.xsl: Added 'verbose' parameter to default templates in title.markup mode and label.markup mode, and made the error message conditional on that parameter. The default value is 1, so the message will still be there for normal usage. But the targets.xsl stylesheet sets verbose to 0 when trolling for cross reference targets to eliminate useless noise on elements that have an id attribute but no title or label. * targetdatabase.dtd: New file. * targets.xsl: New file. 2002-06-11 Norman Walsh <nw...@us...> * common.xsl: Augmented debugging message (commented out) * gentext.xsl: Experimental support for xrefstyle; support for %d in templates * l10n.xsl: Experimental support for xrefstyle * titles.xsl: Support refsynopsisdiv in title.markup mode 2002-05-23 Norman Walsh <nw...@us...> * common.xsl: Support for SVG in HTML 2002-05-21 Norman Walsh <nw...@us...> * gentext.xsl: Whitespace * labels.xsl: Don't generate '. ' after QandA labels 2002-05-12 Norman Walsh <nw...@us...> * common.xsl: Fix bugs in extension checking in mediaobject.filename * l10n.xsl: Reworked test in gentext.template; should have no user-visible changes * table.xsl: Removed some obsolete templates; reworked inheritance for improved border support (still implements old DocBook semantics which aren't quite CALS) * titles.xsl: Improved error message 2002-04-21 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Add support for Hebrew localization 2002-03-24 Norman Walsh <nw...@us...> * common.xsl: Change comment: personname is no longer experimental 2002-03-18 Norman Walsh <nw...@us...> * common.xsl: Replace generate.*.toc and generate.*.lot with single generate.toc parameter. 2002-03-18 Robert Stayton <bob...@us...> * gentext.xsl: Replaced the substitute-markup template with one using simpler logic. Added params for the content to be substituted so it can be used with olinks where the content is supplied from a data file. 2002-03-14 Norman Walsh <nw...@us...> * common.xsl: Handle revisionflag a little better on copyrights * common.xsl, gentext.xsl, l10n.xsl, labels.xsl, subtitles.xsl, table.xsl, titles.xsl: Whitespace only: change CR/LF back to LF. Norm was a total moron. * common.xsl, gentext.xsl, l10n.xsl, labels.xsl, subtitles.xsl, table.xsl, titles.xsl: Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr. 2002-03-07 Robert Stayton <bob...@us...> * titles.xsl: refentry title in title.markup mode now follows $allow-anchors setting to prevent index entries from appearing in the TOC. 2002-01-28 Norman Walsh <nw...@us...> * l10n.dtd, l10n.xml: Tweaks to the l10n.dtd to make it as namespace aware as DTDs can be 2002-01-25 Norman Walsh <nw...@us...> * table.xsl: Fix bug that caused rowsep and colsep to be ignored on empty cells 2002-01-10 Norman Walsh <nw...@us...> * l10n.xsl: Don't rely on the order of attribute nodes cause they don't have one 2002-01-03 Norman Walsh <nw...@us...> * .cvsignore, Makefile: Added Thai localization * common.xsl: Calculate itemized list symbol based on depth analagous to orderedlist numeration * gentext.xsl: Use unnumbered gentext keys appropriately 2001-12-15 Jirka Kosek <ko...@us...> * common.xsl: Improved support for TeX math inside equations. 2001-12-04 Norman Walsh <nw...@us...> * labels.xsl: Bug #435320: Poor enumeration of LoTs and LoFs * titles.xsl: Bug! Can't put HTML here. But what does this break? 2001-12-02 Norman Walsh <nw...@us...> * titles.xsl: Make no.anchor.mode 'sticky'. This is really necessary because otherwise title inlines effectively turn it off 2001-12-01 Norman Walsh <nw...@us...> * labels.xsl: Improve FAQ labeling 2001-11-29 Robert Stayton <bob...@us...> * l10n.xsl: Fixed error message for missing localization so that if missing in en.xml, it doesn't say 'using en'. 2001-11-28 Norman Walsh <nw...@us...> * common.xsl: Added punct.honorific parameter * l10n.xsl: Removed crufty gentext.xref.text template 2001-11-15 Norman Walsh <nw...@us...> * common.xsl: Support experimental personname wrapper 2001-11-14 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Added Basque 2001-11-12 Norman Walsh <nw...@us...> * common.xsl: Support well-formed documents, use key() instead of id() 2001-11-09 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Added Nynorsk 2001-11-06 Norman Walsh <nw...@us...> * labels.xsl: Why did I assume sections should always be labelled in articles? 2001-11-02 Norman Walsh <nw...@us...> * common.xsl: Support FAMILY Given style personal names 2001-10-30 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Added Xhosa 2001-10-16 Norman Walsh <nw...@us...> * table.xsl: Table support improvements 2001-10-15 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Added Ukranian * table.xsl: Fix calculation of rowsep and colsep; added experimental support for table.borders.with.css in HTML; calculation of alignments needs to be added along the same lines 2001-10-14 Norman Walsh <nw...@us...> * table.xsl: New file. 2001-09-25 Norman Walsh <nw...@us...> * common.xsl: Support automatic collation of year ranges in copyright * l10n.xsl: Fix gentext.nav.* templates 2001-09-22 Norman Walsh <nw...@us...> * gentext.xsl: Rewrote substitute-markup to support %p * gentext.xsl, labels.xsl: Bug #463033: allow xref to list items (in orderedlists) and varlistentrys * titles.xsl: Support title.markup for legal notices 2001-08-29 Norman Walsh <nw...@us...> * common.xsl: Fix orderedlist numerations 2001-08-14 Norman Walsh <nw...@us...> * l10n.xsl: Calculation of the dingbat nodeset was simply broken 2001-08-13 Norman Walsh <nw...@us...> * Makefile: Added stylesheet as a dependency 2001-08-04 Norman Walsh <nw...@us...> * l10n.dtd: Rename internationalization to i18n, localization to l10n * l10n.xml: Rename internationalization to i18n, localization to l10n, add namespace declaration * l10n.xsl: Support a local i18n override, rename internationalization to i18n, localization to l10n, add namespace declaration * labels.xsl: PartIntros never get a label 2001-08-01 Norman Walsh <nw...@us...> * gentext.xsl: Pass allow-anchors through properly * labels.xsl: Fix question labelling * titles.xsl: Output anchors for titles if the titles have ids 2001-07-31 Robert Stayton <bob...@us...> * l10n.xsl: Reverted the change from [last()] to [1] back to [last()] because that is the correct code. * l10n.xsl: Added code to the "l10n.language" template to fall back to the two-letter lang code if a longer lang does not have a <lang>.xml localization file. And it falls back to the default lang if it can't find that either. Also fixed a bug for finding the lang attribute. It was using the last() function, but in an ancestor-or-self node set you want the first ancestor (closest) with a lang value. 49c49 < |ancestor-or-self::*/@xml:lang)[last()]"/> --- > |ancestor-or-self::*/@xml:lang)[1]"/> 2001-07-17 Jirka Kosek <ko...@us...> * common.xsl: Fixed bug #442160. Parameter graphic.default.extension is now used also for <graphic> and <inlinegraphic> not only for <imagedata>. 2001-07-08 Norman Walsh <nw...@us...> * gentext.xsl, titles.xsl: Support xref to bridgehead 2001-07-04 <uid...@us...> * .cvsignore, Makefile, l10n.xml: Added support for Turkish * .cvsignore, Makefile, l10n.xml: Added Afrikaans * common.xsl, titles.xsl: Bug #429011, fix xref to qandset elements * labels.xsl: Bug #426188, fix question/answer labels 2001-06-21 Norman Walsh <nw...@us...> * common.xsl, gentext.xsl, labels.xsl, titles.xsl: Use common code to calculate step numbers; support xref to procedures and steps; added formal.procedures parameter 2001-06-20 Norman Walsh <nw...@us...> * l10n.xsl: Xalan debugging; harmless changes 2001-06-14 Norman Walsh <nw...@us...> * subtitles.xsl: Support subtitle on article 2001-05-23 Norman Walsh <nw...@us...> * common.xsl: Fix dup. template bug with is.graphic.* * gentext.xsl: Workaround article/appendix formatting bug (HACK) * labels.xsl: Label appendixes correctly in books and articles 2001-05-21 Norman Walsh <nw...@us...> * labels.xsl: Tweak for section labels in articles 2001-05-12 Norman Walsh <nw...@us...> * common.xsl: Added refsect* to the section.level template 2001-05-04 Norman Walsh <nw...@us...> * .cvsignore, Makefile, l10n.xml: Add Serbian localization 2001-04-21 Norman Walsh <nw...@us...> * common.xsl: My first crude attempts at support for qandaset 2001-04-19 Norman Walsh <nw...@us...> * gentext.xsl, titles.xsl: Fix bug #417193, make sure allow-anchors is properly propagated through substitute-markup 2001-04-18 Norman Walsh <nw...@us...> * titles.xsl: Suppress indexterms in no.anchor.mode 2001-04-17 Norman Walsh <nw...@us...> * labels.xsl: Move label.from.part parameter into param.xsl; default it to 0 so that chapters and appendixes are numbered monotonically throughout a book by default. Moved param.xsl up in the include list, just for good measure 2001-04-16 Norman Walsh <nw...@us...> * gentext.xsl: Fix bug in processing of subtitle content * labels.xsl: Only label.from.part if there actually is a part * titles.xsl: Don't put ulink, link, olink, or xref in titles if anchor's aren't allowed 2001-04-15 Norman Walsh <nw...@us...> * gentext.xsl: Localize the textonly calculations by creating a object.title.markup.textonly mode 2001-04-03 Norman Walsh <nw...@us...> * gentext.xsl, labels.xsl, titles.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters * titles.xsl: Restore no.anchor.mode and suppress footnotes in no.anchor.mode 2001-04-02 Norman Walsh <nw...@us...> * .cvsignore, Makefile: New file. * common.xsl, gentext.xsl, l10n.xml, l10n.xsl, labels.xsl, subtitles.xsl, titles.xsl: New file. * gentext.xsl: Commented out debugging messages * l10n.dtd: New file. --- NEW FILE: af.xml --- <?xml version="1.0" encoding="US-ASCII"?> <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="af" english-language-name="Afrikaans"> <!-- This file is generated automatically. --> <!-- Do not edit this file by hand! --> <!-- See http://docbook.sourceforge.net/ --> <!-- To update this file: edit the corresponding document at --> <!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ --> <l:gentext key="Abstract" text="Samevatting"/> <l:gentext key="abstract" text="samevatting"/> <l:gentext key="Answer" text="Antwoord:"/> <l:gentext key="answer" text="antwoord:"/> <l:gentext key="Appendix" text="Aanhangsel"/> <l:gentext key="appendix" text="aanhangsel"/> <l:gentext key="Article" text="Artikel"/> <l:gentext key="article" text="artikel"/> <l:gentext key="Bibliography" text="Bibliografie"/> <l:gentext key="bibliography" text="bibliografie"/> <l:gentext key="Book" text="Boek"/> <l:gentext key="book" text="boek"/> <l:gentext key="Caution" text="Pas op"/> <l:gentext key="caution" text="pas op"/> <l:gentext key="CAUTION" text="PAS OP"/> <l:gentext key="Chapter" text="Hoofdstuk"/> <l:gentext key="chapter" text="hoofdstuk"/> <l:gentext key="Colophon" text="Kolifon"/> <l:gentext key="colophon" text="kolifon"/> <l:gentext key="Copyright" text="Kopie reg"/> <l:gentext key="copyright" text="kopie reg"/> <l:gentext key="Dedication" text="Opgedra aan"/> <l:gentext key="dedication" text="opgedra aan"/> <l:gentext key="Edition" text="Uitgawe"/> <l:gentext key="edition" text="uitgawe"/> <l:gentext key="Equation" text="Vergelyking"/> <l:gentext key="equation" text="vergelyking"/> <l:gentext key="Example" text="Voorbeeld"/> <l:gentext key="example" text="voorbeeld"/> <l:gentext key="Figure" text="Figuur"/> <l:gentext key="figure" text="figuur"/> <l:gentext key="Glossary" text="Woordlys"/> <l:gentext key="glossary" text="woordlys"/> <l:gentext key="GlossSee" text="WoordelysSien"/> <l:gentext key="glosssee" text="woordelyssien"/> <l:gentext key="GlossSeeAlso" text="WoordelysSienOok"/> <l:gentext key="glossseealso" text="woordelyssienook"/> <l:gentext key="IMPORTANT" text="BELANGRIK"/> <l:gentext key="Important" text="Belangrik"/> <l:gentext key="important" text="belangrik"/> <l:gentext key="Index" text="Indeks"/> <l:gentext key="index" text="indeks"/> <l:gentext key="ISBN" text="ISBN"/> <l:gentext key="isbn" text="isbn"/> <l:gentext key="LegalNotice" text="RegsKennisgewing"/> <l:gentext key="legalnotice" text="regskennisgewing"/> <l:gentext key="MsgAud" text="Teikengroep"/> <l:gentext key="msgaud" text="teikengroep"/> <l:gentext key="MsgLevel" text="Vlak"/> <l:gentext key="msglevel" text="vlak"/> <l:gentext key="MsgOrig" text="Herkoms"/> <l:gentext key="msgorig" text="herkoms"/> <l:gentext key="note" text="opmerking"/> <l:gentext key="NOTE" text="OPMERKING"/> <l:gentext key="Note" text="Opmerking"/> <l:gentext key="Part" text="Deel"/> <l:gentext key="part" text="deel"/> <l:gentext key="Preface" text="Voorwoord"/> <l:gentext key="preface" text="voorwoord"/> <l:gentext key="Procedure" text="Prosedure"/> <l:gentext key="procedure" text="prosedure"/> <l:gentext key="ProductionSet" text="ProduksieStel"/> <l:gentext key="Published" text="Uitgegee"/> <l:gentext key="published" text="uitgegee"/> <l:gentext key="Question" text="Vraag:"/> <l:gentext key="question" text="vraag:"/> <l:gentext key="RefEntry" text="Verwysingslemma"/> <l:gentext key="refentry" text="verwysingslemma"/> <l:gentext key="Reference" text="Verwysing"/> <l:gentext key="reference" text="verwysing"/> <l:gentext key="RefName" text="Verwysingsnaam"/> <l:gentext key="refname" text="verwysingsnaam"/> <l:gentext key="RefSection" text="Verwysingsparagraaf"/> <l:gentext key="refsection" text="verwysingsparagraaf"/> <l:gentext key="RefSynopsisDiv" text="Verwysingsamevatting"/> <l:gentext key="refsynopsisdiv" text="verwysingsamevatting"/> <l:gentext key="RevHistory" text="Hersiening geskiedenis"/> <l:gentext key="revhistory" text="hersiening geskiedenis"/> <l:gentext key="Revision" text="Hersiening"/> <l:gentext key="revision" text="hersiening"/> <l:gentext key="sect1" text="Paragraaf"/> <l:gentext key="sect2" text="Paragraaf"/> <l:gentext key="sect3" text="Paragraaf"/> <l:gentext key="sect4" text="Paragraaf"/> <l:gentext key="sect5" text="Paragraaf"/> <l:gentext key="Section" text="Paragraaf"/> <l:gentext key="section" text="paragraaf"/> <l:gentext key="see" text="sien"/> <l:gentext key="See" text="Sien"/> <l:gentext key="Seealso" text="Sien ook"/> <l:gentext key="seealso" text="sien ook"/> <l:gentext key="SeeAlso" text="Sien Ook"/> <l:gentext key="set" text="versameling"/> <l:gentext key="Set" text="Versameling"/> <l:gentext key="SetIndex" text="VersamelingIndeks"/> <l:gentext key="setindex" text="versamelingindeks"/> <l:gentext key="Sidebar" text="Kantbalk"/> <l:gentext key="sidebar" text="kantbalk"/> <l:gentext key="step" text="stap"/> <l:gentext key="Step" text="Stap"/> <l:gentext key="table" text="tabel"/> <l:gentext key="Table" text="Tabel"/> <l:gentext key="TIP" text="LEIDRAAD"/> <l:gentext key="Tip" text="Leidraad"/> <l:gentext key="tip" text="leidraad"/> <l:gentext key="WARNING" text="WAARSKUWING"/> <l:gentext key="Warning" text="Waarskuwing"/> <l:gentext key="warning" text="waarskuwing"/> <l:gentext key="and" text="en"/> <l:gentext key="by" text="deur"/> <l:gentext key="Edited" text="Geredigeer"/> <l:gentext key="edited" text="geredigeer"/> <l:gentext key="Editedby" text="Geredigeer deur"/> <l:gentext key="editedby" text="geredigeer deur"/> <l:gentext key="in" text="in"/> <l:gentext key="lastlistcomma" text=","/> <l:gentext key="listcomma" text=","/> <l:gentext key="nonexistantelement" text="element bestaan nie"/> <l:gentext key="notes" text="Notas"/> <l:gentext key="Notes" text="notas"/> <l:gentext key="Pgs" text="bl."/> <l:gentext key="pgs" text="bl."/> <l:gentext key="Revisedby" text="Hersien deur"/> <l:gentext key="revisedby" text="hersien deur"/> <l:gentext key="TableNotes" text="TabelOpmerking"/> <l:gentext key="tablenotes" text="tabelopmerking"/> <l:gentext key="TableofContents" text="Inhoudsopgawe"/> <l:gentext key="tableofcontents" text="inhoudsopgawe"/> <l:gentext key="unexpectedelementname" text="onverwagte element naam"/> <l:gentext key="unsupported" text="nie geondersteun"/> <l:gentext key="xrefto" text="verwysing na"/> <l:gentext key="listofequations" text="lys van vergelykings"/> <l:gentext key="ListofEquations" text="Lys van vergelykings"/> <l:gentext key="ListofExamples" text="Lys van voorbeelde"/> <l:gentext key="listofexamples" text="lys van voorbeelde"/> <l:gentext key="ListofFigures" text="Lys van figure"/> <l:gentext key="listoffigures" text="lys van figure"/> <l:gentext key="listoftables" text="lys van tabelle"/> <l:gentext key="ListofTables" text="Lys van tabelle"/> <l:gentext key="ListofUnknown" text="Lys van onbekende tipes"/> <l:gentext key="listofunknown" text="lys van onbekende tipes"/> <l:gentext key="nav-home" text="Begin"/> <l:gentext key="nav-next" text="Volgende"/> <l:gentext key="nav-next-sibling" text="Verder vooruit"/> <l:gentext key="nav-prev" text="Terug"/> <l:gentext key="nav-prev-sibling" text="Verder terug"/> <l:gentext key="nav-up" text="Boontoe"/> <l:gentext key="Draft" text="Proef"/> <l:gentext key="above" text="bo"/> <l:gentext key="below" text="onder"/> <l:gentext key="sectioncalled" text="die seksie genaamd"/> <l:gentext key="index symbols" text="indeks simbole"/> <l:gentext key="lowercase.alpha" text="abcdefghijklmnopqrstuvwxyz"/> <l:gentext key="uppercase.alpha" text="ABCDEFGHIJKLMNOPQRSTUVWXYZ"/> <l:dingbat key="startquote" text="“"/> <l:dingbat key="endquote" text="”"/> <l:dingbat key="nestedstartquote" text="‘"/> <l:dingbat key="nestedendquote" text="’"/> <l:dingbat key="bullet" text="•"/> <l:context name="styles"> <l:template name="person-name" text="first-last"/> </l:context> <l:context name="title"> <l:template name="abstract" text="%t"/> <l:template name="answer" text="%t"/> <l:template name="appendix" text="Aanhangsel %n. %t"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="biblioentry" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliomixed" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="Hoofdstuk %n. %t"/> <l:template name="colophon" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="Vergelyking %n. %t"/> <l:template name="example" text="Voorbeeld %n. %t"/> <l:template name="figure" text="Figuur %n. %t"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text=""/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> <l:template name="msgmain" text="%t"/> <l:template name="msgrel" text="%t"/> <l:template name="msgset" text="%t"/> <l:template name="msgsub" text="%t"/> <l:template name="note" text="%t"/> <l:template name="orderedlist" text="%t"/> <l:template name="part" text="Deel %n. %t"/> <l:template name="partintro" text="%t"/> <l:template name="preface" text="%t"/> <l:template name="procedure" text="%t"/> <l:template name="procedure.formal" text="Prosedure %n. %t"/> <l:template name="productionset" text="%t"/> <l:template name="productionset.formal" text="ProduksieStel %n"/> <l:template name="qandadiv" text="%t"/> <l:template name="qandaentry" text="%t"/> <l:template name="qandaset" text="%t"/> <l:template name="question" text="%t"/> <l:template name="refentry" text="%t"/> <l:template name="reference" text="%t"/> <l:template name="refsection" text="%t"/> <l:template name="refsect1" text="%t"/> <l:template name="refsect2" text="%t"/> <l:template name="refsect3" text="%t"/> <l:template name="refsynopsisdiv" text="%t"/> <l:template name="refsynopsisdivinfo" text="%t"/> <l:template name="segmentedlist" text="%t"/> <l:template name="set" text="%t"/> <l:template name="setindex" text="%t"/> <l:template name="sidebar" text="%t"/> <l:template name="step" text="%t"/> <l:template name="table" text="Tabel %n. %t"/> <l:template name="tip" text="%t"/> <l:template name="toc" text="%t"/> <l:template name="variablelist" text="%t"/> <l:template name="warning" text="%t"/> </l:context> <l:context name="title-unnumbered"> <l:template name="appendix" text="%t"/> <l:template name="bridgehead" text="%t"/> <l:template name="chapter" text="%t"/> <l:template name="sect1" text="%t"/> <l:template name="sect2" text="%t"/> <l:template name="sect3" text="%t"/> <l:template name="sect4" text="%t"/> <l:template name="sect5" text="%t"/> <l:template name="section" text="%t"/> <l:template name="simplesect" text="%t"/> </l:context> <l:context name="title-numbered"> <l:template name="appendix" text="Aanhangsel %n. %t"/> <l:template name="bridgehead" text="%n. %t"/> <l:template name="chapter" text="Hoofdstuk %n. %t"/> <l:template name="sect1" text="%n. %t"/> <l:template name="sect2" text="%n. %t"/> <l:template name="sect3" text="%n. %t"/> <l:template name="sect4" text="%n. %t"/> <l:template name="sect5" text="%n. %t"/> <l:template name="section" text="%n. %t"/> <l:template name="simplesect" text="%n. %t"/> </l:context> <l:context name="subtitle"> <l:template name="appendix" text="%s"/> <l:template name="article" text="%s"/> <l:template name="bibliodiv" text="%s"/> <l:template name="biblioentry" text="%s"/> <l:template name="bibliography" text="%s"/> <l:template name="bibliomixed" text="%s"/> <l:template name="bibliomset" text="%s"/> <l:template name="biblioset" text="%s"/> <l:template name="book" text="%s"/> <l:template name="chapter" text="%s"/> <l:template name="colophon" text="%s"/> <l:template name="dedication" text="%s"/> <l:template name="glossary" text="%s"/> <l:template name="glossdiv" text="%s"/> <l:template name="index" text="%s"/> <l:template name="indexdiv" text="%s"/> <l:template name="lot" text="%s"/> <l:template name="part" text="%s"/> <l:template name="partintro" text="%s"/> <l:template name="preface" text="%s"/> <l:template name="refentry" text="%s"/> <l:template name="reference" text="%s"/> <l:template name="refsection" text="%s"/> <l:template name="refsect1" text="%s"/> <l:template name="refsect2" text="%s"/> <l:template name="refsect3" text="%s"/> <l:template name="refsynopsisdiv" text="%s"/> <l:template name="sect1" text="%s"/> <l:template name="sect2" text="%s"/> <l:template name="sect3" text="%s"/> <l:template name="sect4" text="%s"/> <l:template name="sect5" text="%s"/> <l:template name="section" text="%s"/> <l:template name="set" text="%s"/> <l:template name="setindex" text="%s"/> <l:template name="sidebar" text="%s"/> <l:template name="simplesect" text="%s"/> <l:template name="toc" text="%s"/> </l:context> <l:context name="xref"> <l:template name="abstract" text="%t"/> <l:template name="answer" text="Antwoord: %n"/> <l:template name="appendix" text="Aanhangsel %n"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="Hoofdstuk %n"/> <l:template name="colophon" text="%t"/> <l:template name="constraintdef" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="Vergelyking %n"/> <l:template name="example" text="Voorbeeld %n"/> <l:template name="figure" text="Figuur %n"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text="%n"/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> <l:template name="msgmain" text="%t"/> <l:template name="msgrel" text="%t"/> <l:template name="msgset" text="%t"/> <l:template name="msgsub" text="%t"/> <l:template name="note" text="%t"/> <l:template name="orderedlist" text="%t"/> <l:template name="part" text="Deel %n"/> <l:template name="partintro" text="%t"/> <l:template name="preface" text="%t"/> <l:template name="procedure" text="Prosedure %n"/> <l:template name="productionset" text="%t"/> <l:template name="qandadiv" text="%t"/> <l:template name="qandaentry" text="Vraag: %n"/> <l:template name="qandaset" text="%t"/> <l:template name="question" text="Vraag: %n"/> <l:template name="reference" text="%t"/> <l:template name="refsection" text="%t"/> <l:template name="refsect1" text="%t"/> <l:template name="refsect2" text="%t"/> <l:template name="refsect3" text="%t"/> <l:template name="refsynopsisdiv" text="%t"/> <l:template name="segmentedlist" text="%t"/> <l:template name="set" text="%t"/> <l:template name="setindex" text="%t"/> <l:template name="sidebar" text="%t"/> <l:template name="table" text="Tabel %n"/> <l:template name="tip" text="%t"/> <l:template name="toc" text="%t"/> <l:template name="variablelist" text="%t"/> <l:template name="varlistentry" text="%n"/> <l:template name="warning" text="%t"/> <l:template name="page.citation" text=" [%p]"/> </l:context> <l:context name="section-xref"> <l:template name="bridgehead" text="die seksie genaamd “%t”"/> <l:template name="refsection" text="die seksie genaamd “%t”"/> <l:template name="refsect1" text="die seksie genaamd “%t”"/> <l:template name="refsect2" text="die seksie genaamd “%t”"/> <l:template name="refsect3" text="die seksie genaamd “%t”"/> <l:template name="sect1" text="die seksie genaamd “%t”"/> <l:template name="sect2" text="die seksie genaamd “%t”"/> <l:template name="sect3" text="die seksie genaamd “%t”"/> <l:template name="sect4" text="die seksie genaamd “%t”"/> <l:template name="sect5" text="die seksie genaamd “%t”"/> <l:template name="section" text="die seksie genaamd “%t”"/> <l:template name="simplesect" text="die seksie genaamd “%t”"/> </l:context> <l:context name="section-xref-numbered"> <l:template name="bridgehead" text="die seksie genaamd “%t”"/> <l:template name="refsection" text="die seksie genaamd “%t”"/> <l:template name="refsect1" text="die seksie genaamd “%t”"/> <l:template name="refsect2" text="die seksie genaamd “%t”"/> <l:template name="refsect3" text="die seksie genaamd “%t”"/> <l:template name="sect1" text="Paragraaf %n"/> <l:template name="sect2" text="Paragraaf %n"/> <l:template name="sect3" text="Paragraaf %n"/> <l:template name="sect4" text="Paragraaf %n"/> <l:template name="sect5" text="Paragraaf %n"/> <l:template name="section" text="Paragraaf %n"/> <l:template name="simplesect" text="die seksie genaamd “%t”"/> </l:context> <l:context name="authorgroup"> <l:template name="sep" text=", "/> <l:template name="sep2" text=" en "/> <l:template name="seplast" text=", en "/> </l:context> <l:context name="glossary"> <l:template name="see" text="WoordelysSien "/> <l:template name="seealso" text="WoordelysSienOok "/> </l:context> <l:context name="msgset"> <l:template name="MsgAud" text="Teikengroep: "/> <l:template name="MsgLevel" text="Vlak: "/> <l:template name="MsgOrig" text="Herkoms: "/> </l:context> </l:l10n> --- NEW FILE: bg.xml --- <?xml version="1.0" encoding="US-ASCII"?> <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="bg" english-language-name="Bulgarian"> <!-- This file is generated automatically. --> <!-- Do not edit this file by hand! --> <!-- See http://docbook.sourceforge.net/ --> <!-- To update this file: edit the corresponding document at --> <!-- http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/gentext/locale/ --> <l:gentext key="Abstract" text="Анотация"/> <l:gentext key="abstract" text="Анотация"/> <l:gentext key="Answer" text="О:"/> <l:gentext key="answer" text="О:"/> <l:gentext key="Appendix" text="Приложение"/> <l:gentext key="appendix" text="приложение"/> <l:gentext key="Article" text="Статия"/> <l:gentext key="article" text="Статия"/> <l:gentext key="Bibliography" text="Литература"/> <l:gentext key="bibliography" text="Литература"/> <l:gentext key="Book" text="Книга"/> <l:gentext key="book" text="Книга"/> <l:gentext key="CAUTION" text="ВНИМАНИЕ"/> <l:gentext key="Caution" text="Внимание"/> <l:gentext key="caution" text="Внимание"/> <l:gentext key="Chapter" text="Глава"/> <l:gentext key="chapter" text="глава"/> <l:gentext key="Colophon" text="Colophon"/> <l:gentext key="colophon" text="Colophon"/> <l:gentext key="Copyright" text="Copyright"/> <l:gentext key="copyright" text="Copyright"/> <l:gentext key="Dedication" text="Посвещение"/> <l:gentext key="dedication" text="Посвещение"/> <l:gentext key="Edition" text="Издание"/> <l:gentext key="edition" text="Издание"/> <l:gentext key="Equation" text="Формула"/> <l:gentext key="equation" text="Формула"/> <l:gentext key="Example" text="Пример"/> <l:gentext key="example" text="Пример"/> <l:gentext key="Figure" text="Фигура"/> <l:gentext key="figure" text="Фигура"/> <l:gentext key="Glossary" text="Терминологичен речник"/> <l:gentext key="glossary" text="Терминологичен речник"/> <l:gentext key="GlossSee" text="вж."/> <l:gentext key="glosssee" text="вж."/> <l:gentext key="GlossSeeAlso" text="вж. също"/> <l:gentext key="glossseealso" text="вж. също"/> <l:gentext key="IMPORTANT" text="ВАЖНО"/> <l:gentext key="important" text="Важно"/> <l:gentext key="Important" text="Важно"/> <l:gentext key="Index" text="Индекс"/> <l:gentext key="index" text="Индекс"/> <l:gentext key="ISBN" text="ISBN"/> <l:gentext key="isbn" text="ISBN"/> <l:gentext key="LegalNotice" text="Авторски права"/> <l:gentext key="legalnotice" text="Авторски права"/> <l:gentext key="MsgAud" text="Audience"/> <l:gentext key="msgaud" text="Audience"/> <l:gentext key="MsgLevel" text="Ниво"/> <l:gentext key="msglevel" text="Ниво"/> <l:gentext key="MsgOrig" text="Източник"/> <l:gentext key="msgorig" text="Източник"/> <l:gentext key="NOTE" text="ЗАБЕЛЕЖКА"/> <l:gentext key="Note" text="Забележка"/> <l:gentext key="note" text="Забележка"/> <l:gentext key="Part" text="Част"/> <l:gentext key="part" text="Част"/> <l:gentext key="Preface" text="Предговор"/> <l:gentext key="preface" text="Предговор"/> <l:gentext key="Procedure" text="Процедура"/> <l:gentext key="procedure" text="Процедура"/> <l:gentext key="ProductionSet" text="Production"/> <l:gentext key="Published" text="Издаден"/> <l:gentext key="published" text="Издаден"/> <l:gentext key="Question" text="В:"/> <l:gentext key="question" text="В:"/> <l:gentext key="RefEntry" text=""/> <l:gentext key="refentry" text=""/> <l:gentext key="Reference" text="Справочник"/> <l:gentext key="reference" text="Справочник"/> <l:gentext key="RefName" text="Название"/> <l:gentext key="refname" text="Название"/> <l:gentext key="RefSection" text=""/> <l:gentext key="refsection" text=""/> <l:gentext key="RefSynopsisDiv" text="Синтаксис"/> <l:gentext key="refsynopsisdiv" text="Синтаксис"/> <l:gentext key="RevHistory" text="Промени"/> <l:gentext key="revhistory" text="Промени"/> <l:gentext key="revision" text="Издание"/> <l:gentext key="Revision" text="Издание"/> <l:gentext key="sect1" text="Раздел"/> <l:gentext key="sect2" text="Раздел"/> <l:gentext key="sect3" text="Раздел"/> <l:gentext key="sect4" text="Раздел"/> <l:gentext key="sect5" text="Раздел"/> <l:gentext key="section" text="Раздел"/> <l:gentext key="Section" text="Раздел"/> <l:gentext key="see" text="вж."/> <l:gentext key="seealso" text="вж. също"/> <l:gentext key="set" text="Указател"/> <l:gentext key="Set" text="Указател"/> <l:gentext key="setindex" text="Указател"/> <l:gentext key="SetIndex" text="Указател"/> <l:gentext key="Sidebar" text="Разделител"/> <l:gentext key="sidebar" text="разделител"/> <l:gentext key="step" text="Стъпка"/> <l:gentext key="Step" text="Стъпка"/> <l:gentext key="Table" text="Таблица"/> <l:gentext key="table" text="Таблица"/> <l:gentext key="tip" text="Поздсказка"/> <l:gentext key="TIP" text="ПОДСКАЗКА"/> <l:gentext key="Tip" text="Поздсказка"/> <l:gentext key="Warning" text="Внимание"/> <l:gentext key="warning" text="Внимание"/> <l:gentext key="WARNING" text="ВНИМАНИЕ"/> <l:gentext key="and" text=""/> <l:gentext key="by" text=""/> <l:gentext key="Edited" text="Редактирано от"/> <l:gentext key="edited" text="Редактирано от"/> <l:gentext key="Editedby" text="Редактирано от"/> <l:gentext key="editedby" text="Редактирано от"/> <l:gentext key="in" text="в"/> <l:gentext key="lastlistcomma" text=","/> <l:gentext key="listcomma" text=","/> <l:gentext key="nonexistantelement" text="non-existant element"/> <l:gentext key="notes" text="Забележки"/> <l:gentext key="Notes" text="Забележки"/> <l:gentext key="Pgs" text="стр."/> <l:gentext key="pgs" text="стр."/> <l:gentext key="Revisedby" text="Одобрено от: "/> <l:gentext key="revisedby" text="Одобрено от: "/> <l:gentext key="TableNotes" text="Забележки"/> <l:gentext key="tablenotes" text="Забележки"/> <l:gentext key="TableofContents" text="Съдържание"/> <l:gentext key="tableofcontents" text="Съдържание"/> <l:gentext key="unexpectedelementname" text="unexpected element name"/> <l:gentext key="unsupported" text="unsupported"/> <l:gentext key="xrefto" text="xref to"/> <l:gentext key="listofequations" text="Списък на формулите"/> <l:gentext key="ListofEquations" text="Списък на формулите"/> <l:gentext key="ListofExamples" text="Списък на примерите"/> <l:gentext key="listofexamples" text="Списък на примерите"/> <l:gentext key="ListofFigures" text="Списък на фигурите"/> <l:gentext key="listoffigures" text="Списък на фигурите"/> <l:gentext key="listoftables" text="Списък на таблиците"/> <l:gentext key="ListofTables" text="Списък на таблиците"/> <l:gentext key="ListofUnknown" text="Неопределен списък"/> <l:gentext key="listofunknown" text="Неопределен списък"/> <l:gentext key="nav-home" text="Начало"/> <l:gentext key="nav-next" text="Следваща страница"/> <l:gentext key="nav-next-sibling" text="Следващ раздел"/> <l:gentext key="nav-prev" text="Предишна страница"/> <l:gentext key="nav-prev-sibling" text="Предишен раздел"/> <l:gentext key="nav-up" text="Начало на раздела"/> <l:gentext key="nav-toc" text="Съдържание"/> <l:gentext key="Draft" text="Чернова"/> <l:gentext key="above" text="по-горе"/> <l:gentext key="below" text="по-долу"/> <l:gentext key="sectioncalled" text="the section called"/> <l:gentext key="index symbols" text="Символи"/> <l:gentext key="lowercase.alpha" text="абвгдежзийклмнопрстуфхцчшщъыьэюя"/> <l:gentext key="uppercase.alpha" text="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"/> <l:dingbat key="startquote" text="“"/> <l:dingbat key="endquote" text="”"/> <l:dingbat key="nestedstartquote" text="‘"/> <l:dingbat key="nestedendquote" text="’"/> <l:dingbat key="bullet" text="•"/> <l:context name="styles"> <l:template name="person-name" text="first-last"/> </l:context> <l:context name="title"> <l:template name="abstract" text="%t"/> <l:template name="answer" text="%t"/> <l:template name="appendix" text="Приложение %n. %t"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="biblioentry" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliomixed" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="Глава %n. %t"/> <l:template name="colophon" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="Формула %n. %t"/> <l:template name="example" text="Пример %n. %t"/> <l:template name="figure" text="Фигура %n. %t"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="glossentry" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text=""/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> <l:template name="msgmain" text="%t"/> <l:template name="msgrel" text="%t"/> <l:template name="msgset" text="%t"/> <l:template name="msgsub" text="%t"/> <l:template name="note" text="%t"/> <l:template name="orderedlist" text="%t"/> <l:template name="part" text="Част %n. %t"/> <l:template name="partintro" text="%t"/> <l:template name="preface" text="%t"/> <l:template name="procedure" text="%t"/> <l:template name="procedure.formal" text="Процедура %n. %t"/> <l:template name="productionset" text="%t"/> <l:template name="productionset.formal" text="Production %n"/> <l:template name="qandadiv" text="%t"/> <l:template name="qandaentry" text="%t"/> <l:template name="qandaset" text="%t"/> <l:template name="question" text="%t"/> <l:template name="refentry" text="%t"/> <l:template name="reference" text="%t"/> <l:template name="refsection" text="%t"/> <l:template name="refsect1" text="%t"/> <l:template name="refsect2" text="%t"/> <l:template name="refsect3" text="%t"/> <l:template name="refsynopsisdiv" text="%t"/> <l:template name="refsynopsisdivinfo" text="%t"/> <l:template name="segmentedlist" text="%t"/> <l:template name="set" text="%t"/> <l:template name="setindex" text="%t"/> <l:template name="sidebar" text="%t"/> <l:template name="step" text="%t"/> <l:template name="table" text="Таблица %n. %t"/> <l:template name="tip" text="%t"/> <l:template name="toc" text="%t"/> <l:template name="variablelist" text="%t"/> <l:template name="varlistentry" text=""/> <l:template name="warning" text="%t"/> </l:context> <l:context name="title-unnumbered"> <l:template name="appendix" text="%t"/> <l:template name="article/appendix" text="%t"/> <l:template name="bridgehead" text="%t"/> <l:template name="chapter" text="%t"/> <l:template name="sect1" text="%t"/> <l:template name="sect2" text="%t"/> <l:template name="sect3" text="%t"/> <l:template name="sect4" text="%t"/> <l:template name="sect5" text="%t"/> <l:template name="section" text="%t"/> <l:template name="simplesect" text="%t"/> </l:context> <l:context name="title-numbered"> <l:template name="appendix" text="Приложение %n. %t"/> <l:template name="article/appendix" text="%n. %t"/> <l:template name="bridgehead" text="%n. %t"/> <l:template name="chapter" text="Глава %n. %t"/> <l:template name="sect1" text="%n. %t"/> <l:template name="sect2" text="%n. %t"/> <l:template name="sect3" text="%n. %t"/> <l:template name="sect4" text="%n. %t"/> <l:template name="sect5" text="%n. %t"/> <l:template name="section" text="%n. %t"/> <l:template name="simplesect" text="%t"/> </l:context> <l:context name="subtitle"> <l:template name="appendix" text="%s"/> <l:template name="article" text="%s"/> <l:template name="bibliodiv" text="%s"/> <l:template name="biblioentry" text="%s"/> <l:template name="bibliography" text="%s"/> <l:template name="bibliomixed" text="%s"/> <l:template name="bibliomset" text="%s"/> <l:template name="biblioset" text="%s"/> <l:template name="book" text="%s"/> <l:template name="chapter" text="%s"/> <l:template name="colophon" text="%s"/> <l:template name="dedication" text="%s"/> <l:template name="glossary" text="%s"/> <l:template name="glossdiv" text="%s"/> <l:template name="index" text="%s"/> <l:template name="indexdiv" text="%s"/> <l:template name="lot" text="%s"/> <l:template name="part" text="%s"/> <l:template name="partintro" text="%s"/> <l:template name="preface" text="%s"/> <l:template name="refentry" text="%s"/> <l:template name="reference" text="%s"/> <l:template name="refsection" text="%s"/> <l:template name="refsect1" text="%s"/> <l:template name="refsect2" text="%s"/> <l:template name="refsect3" text="%s"/> <l:template name="refsynopsisdiv" text="%s"/> <l:template name="sect1" text="%s"/> <l:template name="sect2" text="%s"/> <l:template name="sect3" text="%s"/> <l:template name="sect4" text="%s"/> <l:template name="sect5" text="%s"/> <l:template name="section" text="%s"/> <l:template name="set" text="%s"/> <l:template name="setindex" text="%s"/> <l:template name="sidebar" text="%s"/> <l:template name="simplesect" text="%s"/> <l:template name="toc" text="%s"/> </l:context> <l:context name="xref"> <l:template name="abstract" text="%t"/> <l:template name="answer" text="О: %n"/> <l:template name="appendix" text="Приложение %n"/> <l:template name="article" text="%t"/> <l:template name="authorblurb" text="%t"/> <l:template name="bibliodiv" text="%t"/> <l:template name="bibliography" text="%t"/> <l:template name="bibliomset" text="%t"/> <l:template name="biblioset" text="%t"/> <l:template name="blockquote" text="%t"/> <l:template name="book" text="%t"/> <l:template name="calloutlist" text="%t"/> <l:template name="caution" text="%t"/> <l:template name="chapter" text="Глава %n"/> <l:template name="colophon" text="%t"/> <l:template name="constraintdef" text="%t"/> <l:template name="dedication" text="%t"/> <l:template name="equation" text="Формула %n"/> <l:template name="example" text="Пример %n"/> <l:template name="figure" text="Фигура %n"/> <l:template name="formalpara" text="%t"/> <l:template name="glossary" text="%t"/> <l:template name="glossdiv" text="%t"/> <l:template name="important" text="%t"/> <l:template name="index" text="%t"/> <l:template name="indexdiv" text="%t"/> <l:template name="itemizedlist" text="%t"/> <l:template name="legalnotice" text="%t"/> <l:template name="listitem" text="%n"/> <l:template name="lot" text="%t"/> <l:template name="msg" text="%t"/> <l:template name="msgexplan" text="%t"/> ... [truncated message content] |
From: <tu...@us...> - 2003-03-27 23:07:29
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl/lib Added Files: ChangeLog lib.xml lib.xsl lib.xweb Log Message: DocBook XSL now in CVS --- NEW FILE: ChangeLog --- 2002-09-15 Norman Walsh <nw...@us...> * lib.xweb: Fix bug where PIs match the suffix of a name instead of the whole name 2002-06-09 Norman Walsh <nw...@us...> * lib.xweb: Fix bug #496453: make sure comments don't contain illegal chars 2002-05-12 Norman Walsh <nw...@us...> * lib.xweb: Changed default units to px; added length-in-points template 2002-03-25 Norman Walsh <nw...@us...> * .cvsignore: Ignore lib.xsl too * .cvsignore, Makefile, lib.xsl, lib.xweb: Use Literate XML to generate lib.xsl * Makefile: Update documentation build to reflect use of lib.xweb 2002-03-18 Norman Walsh <nw...@us...> * lib.xsl: Replace generate.*.toc and generate.*.lot with single generate.toc parameter. 2002-03-14 Norman Walsh <nw...@us...> * lib.xsl: Whitespace only: change CR/LF back to LF. Norm was a total moron. * lib.xsl: Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr. 2002-01-09 Norman Walsh <nw...@us...> * lib.xsl: Added length-units template to extract units from lengths 2001-11-28 Norman Walsh <nw...@us...> * lib.xsl: Added pi-attribute template 2001-04-03 Norman Walsh <nw...@us...> * lib.xsl: Documentation fixes 2001-04-02 Norman Walsh <nw...@us...> * lib.xsl: New file. --- NEW FILE: lib.xml --- <?xml version="1.0" encoding="utf-8"?> <!-- This file was generated by weave.xsl version 0.00+. Do not edit! --> <!-- See http://sourceforge.net/projects/docbook/ --> <!DOCTYPE book PUBLIC "-//DocBook Open Repository//DTD DocBook Literate Programming V0.0//EN" "http://docbook.sourceforge.net/release/litprog/current/dtd/ldocbook.dtd"> <book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <bookinfo> <title>XSL Library Template Reference</title> <releaseinfo role="cvs">$Id: lib.xml,v 1.1 2003/03/27 23:07:21 turin42 Exp $ </releaseinfo> <corpauthor>DocBook Open Repository Team</corpauthor> <copyright> <year>1999</year> <year>2000</year> <year>2001</year> <year>2002</year> <holder>Norman Walsh</holder> </copyright> </bookinfo> <preface><title>Introduction</title> <para>This is technical reference documentation for the DocBook XSL Stylesheets; it documents (some of) the parameters, templates, and other elements of the stylesheets.</para> <para>This is not intended to be <quote>user</quote> documentation. It is provided for developers writing customization layers for the stylesheets, and for anyone who's interested in <quote>how it works</quote>.</para> <para>Although I am trying to be thorough, this documentation is known to be incomplete. Don't forget to read the source, too :-)</para> </preface> <reference> <title>General Library Templates</title> <refentry id="dot.count"> <refnamediv> <refname>dot.count</refname> <refpurpose>Returns the number of <quote>.</quote> characters in a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <programlisting format="linespecific"><src:fragment id="dot.count.frag"><xsl:template name="dot.count"> <!-- Returns the number of "." characters in a string --> <xsl:param name="string"/> <xsl:param name="count" select="0"/> <xsl:choose> <xsl:when test="contains($string, '.')"> <xsl:call-template name="dot.count"> <xsl:with-param name="string" select="substring-after($string, '.')"/> <xsl:with-param name="count" select="$count+1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$count"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="copy-string"> <refnamediv> <refname>copy-string</refname> <refpurpose>Returns <quote>count</quote> copies of a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <programlisting format="linespecific"><src:fragment id="copy-string.frag"><xsl:template name="copy-string"> <!-- returns 'count' copies of 'string' --> <xsl:param name="string"/> <xsl:param name="count" select="0"/> <xsl:param name="result"/> <xsl:choose> <xsl:when test="$count>0"> <xsl:call-template name="copy-string"> <xsl:with-param name="string" select="$string"/> <xsl:with-param name="count" select="$count - 1"/> <xsl:with-param name="result"> <xsl:value-of select="$result"/> <xsl:value-of select="$string"/> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$result"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ====================================================================== --> <refentry id="string.subst"> <refnamediv> <refname>string.subst</refname> <refpurpose>Substitute one text string for another in a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">string.subst</function> template replaces all occurances of <parameter moreinfo="none">target</parameter> in <parameter moreinfo="none">string</parameter> with <parameter moreinfo="none">replacement</parameter> and returns the result. </para> <programlisting format="linespecific"><src:fragment id="string.subst.frag"><xsl:template name="string.subst"> <xsl:param name="string"/> <xsl:param name="target"/> <xsl:param name="replacement"/> <xsl:choose> <xsl:when test="contains($string, $target)"> <xsl:variable name="rest"> <xsl:call-template name="string.subst"> <xsl:with-param name="string" select="substring-after($string, $target)"/> <xsl:with-param name="target" select="$target"/> <xsl:with-param name="replacement" select="$replacement"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat(substring-before($string, $target), $replacement, $rest)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="xpointer.idref"> <refnamediv> <refname>xpointer.idref</refname> <refpurpose>Extract IDREF from an XPointer</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">xpointer.idref</function> template returns the ID portion of an XPointer which is a pointer to an ID within the current document, or the empty string if it is not.</para> <para>In other words, <function moreinfo="none">xpointer.idref</function> returns <quote>foo</quote> when passed either <literal moreinfo="none">#foo</literal> or <literal moreinfo="none">#xpointer(id('foo'))</literal>, otherwise it returns the empty string.</para> <programlisting format="linespecific"><src:fragment id="xpointer.idref.frag"><xsl:template name="xpointer.idref"> <xsl:param name="xpointer">http://...</xsl:param> <xsl:choose> <xsl:when test="starts-with($xpointer, '#xpointer(id(')"> <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/> <xsl:variable name="quote" select="substring($rest, 1, 1)"/> <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/> </xsl:when> <xsl:when test="starts-with($xpointer, '#')"> <xsl:value-of select="substring-after($xpointer, '#')"/> </xsl:when> <!-- otherwise it's a pointer to some other document --> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-magnitude"> <refnamediv> <refname>length-magnitude</refname> <refpurpose>Return the unqualified dimension from a length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">length-magnitude</function> template returns the unqualified length ("20" for "20pt") from a dimension. </para> <programlisting format="linespecific"><src:fragment id="length-magnitude.frag"><xsl:template name="length-magnitude"> <xsl:param name="length" select="'0pt'"/> <xsl:choose> <xsl:when test="string-length($length) = 0"/> <xsl:when test="substring($length,1,1) = '0' or substring($length,1,1) = '1' or substring($length,1,1) = '2' or substring($length,1,1) = '3' or substring($length,1,1) = '4' or substring($length,1,1) = '5' or substring($length,1,1) = '6' or substring($length,1,1) = '7' or substring($length,1,1) = '8' or substring($length,1,1) = '9' or substring($length,1,1) = '.'"> <xsl:value-of select="substring($length,1,1)"/> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="substring($length,2)"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-units"> <refnamediv> <refname>length-units</refname> <refpurpose>Return the units from a length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">length-units</function> template returns the units ("pt" for "20pt") from a length. If no units are supplied on the length, the <parameter moreinfo="none">defauilt.units</parameter> are returned.</para> <programlisting format="linespecific"><src:fragment id="length-units.frag"><xsl:template name="length-units"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$units"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-spec"> <refnamediv> <refname>length-spec</refname> <refpurpose>Return a fully qualified length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">length-spec</function> template returns the qualified length from a dimension. If an unqualified length is given, the <parameter moreinfo="none">default.units</parameter> will be added to it. </para> <programlisting format="linespecific"><src:fragment id="length-spec.frag"><xsl:template name="length-spec"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:value-of select="$magnitude"/> <xsl:choose> <xsl:when test="$units='cm' or $units='mm' or $units='in' or $units='pt' or $units='pc' or $units='px' or $units='em'"> <xsl:value-of select="$units"/> </xsl:when> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-in-points"> <refnamediv> <refname>length-in-points</refname> <refpurpose>Returns the size, in points, of a specified length</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">length-in-points</function> template converts a length specification to points and returns that value as an unqualified number. </para> <caution> <para>There is no way for the template to infer the size of an <literal moreinfo="none">em</literal>. It relies on the default <parameter moreinfo="none">em.size</parameter> which is initially <literal moreinfo="none">10</literal> (for 10pt).</para> <para>Similarly, converting pixesl to points relies on the <parameter moreinfo="none">pixels.per.inch</parameter> parameter which is initially <literal moreinfo="none">90</literal>. </para> </caution> <programlisting format="linespecific"><src:fragment id="length-in-points.frag"><xsl:template name="length-in-points"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="em.size" select="10"/> <xsl:param name="pixels.per.inch" select="90"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = 'pt'"> <xsl:value-of select="$magnitude"/> </xsl:when> <xsl:when test="$units = 'cm'"> <xsl:value-of select="$magnitude div 2.54 * 72.0"/> </xsl:when> <xsl:when test="$units = 'mm'"> <xsl:value-of select="$magnitude div 25.4 * 72.0"/> </xsl:when> <xsl:when test="$units = 'in'"> <xsl:value-of select="$magnitude * 72.0"/> </xsl:when> <xsl:when test="$units = 'pc'"> <xsl:value-of select="$magnitude div 6.0 * 72.0"/> </xsl:when> <xsl:when test="$units = 'px'"> <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/> </xsl:when> <xsl:when test="$units = 'em'"> <xsl:value-of select="$magnitude * $em.size"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="pi-attribute"> <refnamediv> <refname>pi-attribute</refname> <refpurpose>Extract a pseudo-attribute from a PI</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">pi-attribute</function> template extracts a pseudo-attribute from a processing instruction. For example, given the PI <quote><literal moreinfo="none"><?foo bar="1" baz='red'?></literal></quote>,</para> <programlisting format="linespecific"><xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="processing-instruction('foo')"/> <xsl:with-param name="attribute" select="'baz'"/> </xsl:call-template></programlisting> <para>will return <quote>red</quote>. This template returns the first matching attribute that it finds. Presented with processing instructions that contain badly formed pseudo-attributes (missing or unbalanced quotes, for example), the template may silently return erroneous results.</para> <programlisting format="linespecific"><src:fragment id="pi-attribute.frag"><xsl:template name="pi-attribute"> <xsl:param name="pis" select="processing-instruction('')"/> <xsl:param name="attribute">filename</xsl:param> <xsl:param name="count">1</xsl:param> <xsl:choose> <xsl:when test="$count>count($pis)"> <!-- not found --> </xsl:when> <xsl:otherwise> <xsl:variable name="pi"> <xsl:value-of select="$pis[$count]"/> </xsl:variable> <xsl:choose> <xsl:when test="contains($pi,concat($attribute, '='))"> <xsl:variable name="rest" select="substring-after($pi,concat($attribute,'='))"/> <xsl:variable name="quote" select="substring($rest,1,1)"/> <xsl:value-of select="substring-before(substring($rest,2),$quote)"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="$pis"/> <xsl:with-param name="attribute" select="$attribute"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="lookup.key"> <refnamediv> <refname>lookup.key</refname> <refpurpose>Retrieve the value associated with a particular key in a table</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>Given a table of space-delimited key/value pairs, the <function moreinfo="none">lookup.key</function> template extracts the value associated with a particular key.</para> <programlisting format="linespecific"><src:fragment id="lookup.key.frag"><xsl:template name="lookup.key"> <xsl:param name="key" select="''"/> <xsl:param name="table" select="''"/> <xsl:if test="contains($table, ' ')"> <xsl:choose> <xsl:when test="substring-before($table, ' ') = $key"> <xsl:variable name="rest" select="substring-after($table, ' ')"/> <xsl:choose> <xsl:when test="contains($rest, ' ')"> <xsl:value-of select="substring-before($rest, ' ')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$rest"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="lookup.key"> <xsl:with-param name="key" select="$key"/> <xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="xpath.location"> <refnamediv> <refname>xpath.location</refname> <refpurpose>Calculate the XPath child-sequence to the current node</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">xpath.location</function> template calculates the absolute path from the root of the tree to the current element node. </para> <programlisting format="linespecific"><src:fragment id="xpath.location.frag"><xsl:template name="xpath.location"> <xsl:param name="node" select="."/> <xsl:param name="path" select="''"/> <xsl:variable name="next.path"> <xsl:value-of select="local-name($node)"/> <xsl:if test="$path != ''">/</xsl:if> <xsl:value-of select="$path"/> </xsl:variable> <xsl:choose> <xsl:when test="$node/parent::*"> <xsl:call-template name="xpath.location"> <xsl:with-param name="node" select="$node/parent::*"/> <xsl:with-param name="path" select="$next.path"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:text>/</xsl:text> <xsl:value-of select="$next.path"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="comment-escape-string"> <refnamediv> <refname>comment-escape-string</refname> <refpurpose>Prepare a string for inclusion in an XML comment</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">comment-escape-string</function> template returns a string that has been transformed so that it can safely be output as an XML comment. Internal occurrences of "--" will be replaced with "- -" and a leading and/or trailing space will be added to the string, if necessary.</para> <programlisting format="linespecific"><src:fragment id="comment-escape-string"><xsl:template name="comment-escape-string"> <xsl:param name="string" select="''"/> <xsl:if test="starts-with($string, '-')"> <xsl:text> </xsl:text> </xsl:if> <xsl:call-template name="comment-escape-string.recursive"> <xsl:with-param name="string" select="$string"/> </xsl:call-template> <xsl:if test="substring($string, string-length($string), 1) = '-'"> <xsl:text> </xsl:text> </xsl:if> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <refentry id="comment-escape-string.recursive"> <refnamediv> <refname>comment-escape-string.recursive</refname> <refpurpose>Internal function used by comment-escape-string</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function moreinfo="none">comment-escape-string.recursive</function> template is used by <function moreinfo="none">comment-escape-string</function>.</para> <programlisting format="linespecific"><src:fragment id="comment-escape-string.recursive"><xsl:template name="comment-escape-string.recursive"> <xsl:param name="string" select="''"/> <xsl:choose> <xsl:when test="contains($string, '--')"> <xsl:value-of select="substring-before($string, '--')"/> <xsl:value-of select="'- -'"/> <xsl:call-template name="comment-escape-string.recursive"> <xsl:with-param name="string" select="substring-after($string, '--')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> </reference> <reference> <title>Relative URI Functions</title> <partintro><title>Introduction</title> <para>These functions manipulate relative URI references.</para> <para>The following assumptions must hold true:</para> <orderedlist inheritnum="ignore" continuation="restarts"> <listitem> <para>All URIs are relative.</para> </listitem> <listitem> <para>No URI contains the <quote><literal moreinfo="none">../</literal></quote> sequence which would effectively move <quote>up</quote> the hierarchy.</para> </listitem> </orderedlist> <para>If these assumptions do not hold, the results are unpredictable.</para> </partintro> <refentry id="count.uri.path.depth"> <refnamediv> <refname>count.uri.path.depth</refname> <refpurpose>Count the number of path components in a relative URI</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>This function counts the number of path components in a relative URI.</para> <programlisting format="linespecific"><src:fragment id="count.uri.path.depth.frag"><xsl:template name="count.uri.path.depth"> <xsl:param name="filename" select="''"/> <xsl:param name="count" select="0"/> <xsl:choose> <xsl:when test="contains($filename, '/')"> <xsl:call-template name="count.uri.path.depth"> <xsl:with-param name="filename" select="substring-after($filename, '/')"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$count"/> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> <refentry id="trim.common.uri.paths"> <refnamediv> <refname>trim.common.uri.paths</refname> <refpurpose>Trim common leading path components from a relative URI</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>This function trims common leading path components from a relative URI.</para> <programlisting format="linespecific"><src:fragment id="trim.common.uri.paths.frag"><xsl:template name="trim.common.uri.paths"> <xsl:param name="uriA" select="''"/> <xsl:param name="uriB" select="''"/> <xsl:param name="return" select="'A'"/> <xsl:choose> <xsl:when test="contains($uriA, '/') and contains($uriB, '/') and substring-before($uriA, '/') = substring-before($uriB, '/')"> <xsl:call-template name="trim.common.uri.paths"> <xsl:with-param name="uriA" select="substring-after($uriA, '/')"/> <xsl:with-param name="uriB" select="substring-after($uriB, '/')"/> <xsl:with-param name="return" select="$return"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$return = 'A'"> <xsl:value-of select="$uriA"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$uriB"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template></src:fragment></programlisting> </refsect1> </refentry> </reference> <appendix><title>The Stylesheet</title> <para>The <filename moreinfo="none">lib.xsl</filename> stylesheet is just a wrapper around these functions.</para> <src:fragment id="top"> <!-- ******************************************************************** $Id: lib.xml,v 1.1 2003/03/27 23:07:21 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. This module implements DTD-independent functions ******************************************************************** --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="src" version="1.0"> <src:fragref linkend="dot.count.frag"/> <src:fragref linkend="copy-string.frag"/> <src:fragref linkend="string.subst.frag"/> <src:fragref linkend="xpointer.idref.frag"/> <src:fragref linkend="length-magnitude.frag"/> <src:fragref linkend="length-units.frag"/> <src:fragref linkend="length-spec.frag"/> <src:fragref linkend="length-in-points.frag"/> <src:fragref linkend="pi-attribute.frag"/> <src:fragref linkend="lookup.key.frag"/> <src:fragref linkend="xpath.location.frag"/> <src:fragref linkend="comment-escape-string"/> <src:fragref linkend="comment-escape-string.recursive"/> <src:fragref linkend="count.uri.path.depth.frag"/> <src:fragref linkend="trim.common.uri.paths.frag"/> </xsl:stylesheet></src:fragment> </appendix> </book> --- NEW FILE: lib.xsl --- <?xml version="1.0" encoding="utf-8"?> <!-- ******************************************************************** $Id: lib.xsl,v 1.1 2003/03/27 23:07:22 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. This module implements DTD-independent functions ******************************************************************** --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0"> <xsl:template name="dot.count"> <!-- Returns the number of "." characters in a string --> <xsl:param name="string"/> <xsl:param name="count" select="0"/> <xsl:choose> <xsl:when test="contains($string, '.')"> <xsl:call-template name="dot.count"> <xsl:with-param name="string" select="substring-after($string, '.')"/> <xsl:with-param name="count" select="$count+1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$count"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="copy-string"> <!-- returns 'count' copies of 'string' --> <xsl:param name="string"/> <xsl:param name="count" select="0"/> <xsl:param name="result"/> <xsl:choose> <xsl:when test="$count>0"> <xsl:call-template name="copy-string"> <xsl:with-param name="string" select="$string"/> <xsl:with-param name="count" select="$count - 1"/> <xsl:with-param name="result"> <xsl:value-of select="$result"/> <xsl:value-of select="$string"/> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$result"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="string.subst"> <xsl:param name="string"/> <xsl:param name="target"/> <xsl:param name="replacement"/> <xsl:choose> <xsl:when test="contains($string, $target)"> <xsl:variable name="rest"> <xsl:call-template name="string.subst"> <xsl:with-param name="string" select="substring-after($string, $target)"/> <xsl:with-param name="target" select="$target"/> <xsl:with-param name="replacement" select="$replacement"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat(substring-before($string, $target), $replacement, $rest)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="xpointer.idref"> <xsl:param name="xpointer">http://...</xsl:param> <xsl:choose> <xsl:when test="starts-with($xpointer, '#xpointer(id(')"> <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/> <xsl:variable name="quote" select="substring($rest, 1, 1)"/> <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/> </xsl:when> <xsl:when test="starts-with($xpointer, '#')"> <xsl:value-of select="substring-after($xpointer, '#')"/> </xsl:when> <!-- otherwise it's a pointer to some other document --> </xsl:choose> </xsl:template> <xsl:template name="length-magnitude"> <xsl:param name="length" select="'0pt'"/> <xsl:choose> <xsl:when test="string-length($length) = 0"/> <xsl:when test="substring($length,1,1) = '0' or substring($length,1,1) = '1' or substring($length,1,1) = '2' or substring($length,1,1) = '3' or substring($length,1,1) = '4' or substring($length,1,1) = '5' or substring($length,1,1) = '6' or substring($length,1,1) = '7' or substring($length,1,1) = '8' or substring($length,1,1) = '9' or substring($length,1,1) = '.'"> <xsl:value-of select="substring($length,1,1)"/> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="substring($length,2)"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="length-units"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$units"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="length-spec"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:value-of select="$magnitude"/> <xsl:choose> <xsl:when test="$units='cm' or $units='mm' or $units='in' or $units='pt' or $units='pc' or $units='px' or $units='em'"> <xsl:value-of select="$units"/> </xsl:when> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="length-in-points"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="em.size" select="10"/> <xsl:param name="pixels.per.inch" select="90"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = 'pt'"> <xsl:value-of select="$magnitude"/> </xsl:when> <xsl:when test="$units = 'cm'"> <xsl:value-of select="$magnitude div 2.54 * 72.0"/> </xsl:when> <xsl:when test="$units = 'mm'"> <xsl:value-of select="$magnitude div 25.4 * 72.0"/> </xsl:when> <xsl:when test="$units = 'in'"> <xsl:value-of select="$magnitude * 72.0"/> </xsl:when> <xsl:when test="$units = 'pc'"> <xsl:value-of select="$magnitude div 6.0 * 72.0"/> </xsl:when> <xsl:when test="$units = 'px'"> <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/> </xsl:when> <xsl:when test="$units = 'em'"> <xsl:value-of select="$magnitude * $em.size"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="pi-attribute"> <xsl:param name="pis" select="processing-instruction('')"/> <xsl:param name="attribute">filename</xsl:param> <xsl:param name="count">1</xsl:param> <xsl:choose> <xsl:when test="$count>count($pis)"> <!-- not found --> </xsl:when> <xsl:otherwise> <xsl:variable name="pi"> <xsl:value-of select="$pis[$count]"/> </xsl:variable> <xsl:choose> <xsl:when test="contains($pi,concat($attribute, '='))"> <xsl:variable name="rest" select="substring-after($pi,concat($attribute,'='))"/> <xsl:variable name="quote" select="substring($rest,1,1)"/> <xsl:value-of select="substring-before(substring($rest,2),$quote)"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="$pis"/> <xsl:with-param name="attribute" select="$attribute"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="lookup.key"> <xsl:param name="key" select="''"/> <xsl:param name="table" select="''"/> <xsl:if test="contains($table, ' ')"> <xsl:choose> <xsl:when test="substring-before($table, ' ') = $key"> <xsl:variable name="rest" select="substring-after($table, ' ')"/> <xsl:choose> <xsl:when test="contains($rest, ' ')"> <xsl:value-of select="substring-before($rest, ' ')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$rest"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="lookup.key"> <xsl:with-param name="key" select="$key"/> <xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <xsl:template name="xpath.location"> <xsl:param name="node" select="."/> <xsl:param name="path" select="''"/> <xsl:variable name="next.path"> <xsl:value-of select="local-name($node)"/> <xsl:if test="$path != ''">/</xsl:if> <xsl:value-of select="$path"/> </xsl:variable> <xsl:choose> <xsl:when test="$node/parent::*"> <xsl:call-template name="xpath.location"> <xsl:with-param name="node" select="$node/parent::*"/> <xsl:with-param name="path" select="$next.path"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:text>/</xsl:text> <xsl:value-of select="$next.path"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="comment-escape-string"> <xsl:param name="string" select="''"/> <xsl:if test="starts-with($string, '-')"> <xsl:text> </xsl:text> </xsl:if> <xsl:call-template name="comment-escape-string.recursive"> <xsl:with-param name="string" select="$string"/> </xsl:call-template> <xsl:if test="substring($string, string-length($string), 1) = '-'"> <xsl:text> </xsl:text> </xsl:if> </xsl:template> <xsl:template name="comment-escape-string.recursive"> <xsl:param name="string" select="''"/> <xsl:choose> <xsl:when test="contains($string, '--')"> <xsl:value-of select="substring-before($string, '--')"/> <xsl:value-of select="'- -'"/> <xsl:call-template name="comment-escape-string.recursive"> <xsl:with-param name="string" select="substring-after($string, '--')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="count.uri.path.depth"> <xsl:param name="filename" select="''"/> <xsl:param name="count" select="0"/> <xsl:choose> <xsl:when test="contains($filename, '/')"> <xsl:call-template name="count.uri.path.depth"> <xsl:with-param name="filename" select="substring-after($filename, '/')"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$count"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="trim.common.uri.paths"> <xsl:param name="uriA" select="''"/> <xsl:param name="uriB" select="''"/> <xsl:param name="return" select="'A'"/> <xsl:choose> <xsl:when test="contains($uriA, '/') and contains($uriB, '/') and substring-before($uriA, '/') = substring-before($uriB, '/')"> <xsl:call-template name="trim.common.uri.paths"> <xsl:with-param name="uriA" select="substring-after($uriA, '/')"/> <xsl:with-param name="uriB" select="substring-after($uriB, '/')"/> <xsl:with-param name="return" select="$return"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$return = 'A'"> <xsl:value-of select="$uriA"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$uriB"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> --- NEW FILE: lib.xweb --- <book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <bookinfo> <title>XSL Library Template Reference</title> <releaseinfo role="cvs">$Id: lib.xweb,v 1.1 2003/03/27 23:07:22 turin42 Exp $ </releaseinfo> <corpauthor>DocBook Open Repository Team</corpauthor> <copyright> <year>1999</year> <year>2000</year> <year>2001</year> <year>2002</year> <holder>Norman Walsh</holder> </copyright> </bookinfo> <preface><title>Introduction</title> <para>This is technical reference documentation for the DocBook XSL Stylesheets; it documents (some of) the parameters, templates, and other elements of the stylesheets.</para> <para>This is not intended to be <quote>user</quote> documentation. It is provided for developers writing customization layers for the stylesheets, and for anyone who's interested in <quote>how it works</quote>.</para> <para>Although I am trying to be thorough, this documentation is known to be incomplete. Don't forget to read the source, too :-)</para> </preface> <reference> <title>General Library Templates</title> <refentry id="dot.count"> <refnamediv> <refname>dot.count</refname> <refpurpose>Returns the number of <quote>.</quote> characters in a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <programlisting><src:fragment id='dot.count.frag'> <xsl:template name="dot.count"> <!-- Returns the number of "." characters in a string --> <xsl:param name="string"></xsl:param> <xsl:param name="count" select="0"/> <xsl:choose> <xsl:when test="contains($string, '.')"> <xsl:call-template name="dot.count"> <xsl:with-param name="string" select="substring-after($string, '.')"/> <xsl:with-param name="count" select="$count+1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$count"/> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="copy-string"> <refnamediv> <refname>copy-string</refname> <refpurpose>Returns <quote>count</quote> copies of a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <programlisting><src:fragment id='copy-string.frag'> <xsl:template name="copy-string"> <!-- returns 'count' copies of 'string' --> <xsl:param name="string"></xsl:param> <xsl:param name="count" select="0"/> <xsl:param name="result"></xsl:param> <xsl:choose> <xsl:when test="$count>0"> <xsl:call-template name="copy-string"> <xsl:with-param name="string" select="$string"/> <xsl:with-param name="count" select="$count - 1"/> <xsl:with-param name="result"> <xsl:value-of select="$result"/> <xsl:value-of select="$string"/> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$result"/> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ====================================================================== --> <refentry id="string.subst"> <refnamediv> <refname>string.subst</refname> <refpurpose>Substitute one text string for another in a string</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>string.subst</function> template replaces all occurances of <parameter>target</parameter> in <parameter>string</parameter> with <parameter>replacement</parameter> and returns the result. </para> <programlisting><src:fragment id='string.subst.frag'> <xsl:template name="string.subst"> <xsl:param name="string"></xsl:param> <xsl:param name="target"></xsl:param> <xsl:param name="replacement"></xsl:param> <xsl:choose> <xsl:when test="contains($string, $target)"> <xsl:variable name="rest"> <xsl:call-template name="string.subst"> <xsl:with-param name="string" select="substring-after($string, $target)"/> <xsl:with-param name="target" select="$target"/> <xsl:with-param name="replacement" select="$replacement"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat(substring-before($string, $target), $replacement, $rest)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="xpointer.idref"> <refnamediv> <refname>xpointer.idref</refname> <refpurpose>Extract IDREF from an XPointer</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>xpointer.idref</function> template returns the ID portion of an XPointer which is a pointer to an ID within the current document, or the empty string if it is not.</para> <para>In other words, <function>xpointer.idref</function> returns <quote>foo</quote> when passed either <literal>#foo</literal> or <literal>#xpointer(id('foo'))</literal>, otherwise it returns the empty string.</para> <programlisting><src:fragment id='xpointer.idref.frag'> <xsl:template name="xpointer.idref"> <xsl:param name="xpointer">http://...</xsl:param> <xsl:choose> <xsl:when test="starts-with($xpointer, '#xpointer(id(')"> <xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"/> <xsl:variable name="quote" select="substring($rest, 1, 1)"/> <xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"/> </xsl:when> <xsl:when test="starts-with($xpointer, '#')"> <xsl:value-of select="substring-after($xpointer, '#')"/> </xsl:when> <!-- otherwise it's a pointer to some other document --> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-magnitude"> <refnamediv> <refname>length-magnitude</refname> <refpurpose>Return the unqualified dimension from a length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>length-magnitude</function> template returns the unqualified length ("20" for "20pt") from a dimension. </para> <programlisting><src:fragment id='length-magnitude.frag'> <xsl:template name="length-magnitude"> <xsl:param name="length" select="'0pt'"/> <xsl:choose> <xsl:when test="string-length($length) = 0"/> <xsl:when test="substring($length,1,1) = '0' or substring($length,1,1) = '1' or substring($length,1,1) = '2' or substring($length,1,1) = '3' or substring($length,1,1) = '4' or substring($length,1,1) = '5' or substring($length,1,1) = '6' or substring($length,1,1) = '7' or substring($length,1,1) = '8' or substring($length,1,1) = '9' or substring($length,1,1) = '.'"> <xsl:value-of select="substring($length,1,1)"/> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="substring($length,2)"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-units"> <refnamediv> <refname>length-units</refname> <refpurpose>Return the units from a length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>length-units</function> template returns the units ("pt" for "20pt") from a length. If no units are supplied on the length, the <parameter>defauilt.units</parameter> are returned.</para> <programlisting><src:fragment id='length-units.frag'> <xsl:template name="length-units"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$units"/> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-spec"> <refnamediv> <refname>length-spec</refname> <refpurpose>Return a fully qualified length specification</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>length-spec</function> template returns the qualified length from a dimension. If an unqualified length is given, the <parameter>default.units</parameter> will be added to it. </para> <programlisting><src:fragment id='length-spec.frag'> <xsl:template name="length-spec"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="default.units" select="'px'"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:value-of select="$magnitude"/> <xsl:choose> <xsl:when test="$units='cm' or $units='mm' or $units='in' or $units='pt' or $units='pc' or $units='px' or $units='em'"> <xsl:value-of select="$units"/> </xsl:when> <xsl:when test="$units = ''"> <xsl:value-of select="$default.units"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="length-in-points"> <refnamediv> <refname>length-in-points</refname> <refpurpose>Returns the size, in points, of a specified length</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>length-in-points</function> template converts a length specification to points and returns that value as an unqualified number. </para> <caution> <para>There is no way for the template to infer the size of an <literal>em</literal>. It relies on the default <parameter>em.size</parameter> which is initially <literal>10</literal> (for 10pt).</para> <para>Similarly, converting pixesl to points relies on the <parameter>pixels.per.inch</parameter> parameter which is initially <literal>90</literal>. </para> </caution> <programlisting><src:fragment id='length-in-points.frag'> <xsl:template name="length-in-points"> <xsl:param name="length" select="'0pt'"/> <xsl:param name="em.size" select="10"/> <xsl:param name="pixels.per.inch" select="90"/> <xsl:variable name="magnitude"> <xsl:call-template name="length-magnitude"> <xsl:with-param name="length" select="$length"/> </xsl:call-template> </xsl:variable> <xsl:variable name="units"> <xsl:value-of select="substring($length, string-length($magnitude)+1)"/> </xsl:variable> <xsl:choose> <xsl:when test="$units = 'pt'"> <xsl:value-of select="$magnitude"/> </xsl:when> <xsl:when test="$units = 'cm'"> <xsl:value-of select="$magnitude div 2.54 * 72.0"/> </xsl:when> <xsl:when test="$units = 'mm'"> <xsl:value-of select="$magnitude div 25.4 * 72.0"/> </xsl:when> <xsl:when test="$units = 'in'"> <xsl:value-of select="$magnitude * 72.0"/> </xsl:when> <xsl:when test="$units = 'pc'"> <xsl:value-of select="$magnitude div 6.0 * 72.0"/> </xsl:when> <xsl:when test="$units = 'px'"> <xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"/> </xsl:when> <xsl:when test="$units = 'em'"> <xsl:value-of select="$magnitude * $em.size"/> </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Unrecognized unit of measure: </xsl:text> <xsl:value-of select="$units"/> <xsl:text>.</xsl:text> </xsl:message> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="pi-attribute"> <refnamediv> <refname>pi-attribute</refname> <refpurpose>Extract a pseudo-attribute from a PI</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>pi-attribute</function> template extracts a pseudo-attribute from a processing instruction. For example, given the PI <quote><literal><?foo bar="1" baz='red'?></literal></quote>,</para> <programlisting><![CDATA[<xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="processing-instruction('foo')"/> <xsl:with-param name="attribute" select="'baz'"/> </xsl:call-template>]]></programlisting> <para>will return <quote>red</quote>. This template returns the first matching attribute that it finds. Presented with processing instructions that contain badly formed pseudo-attributes (missing or unbalanced quotes, for example), the template may silently return erroneous results.</para> <programlisting><src:fragment id='pi-attribute.frag'> <xsl:template name="pi-attribute"> <xsl:param name="pis" select="processing-instruction('')"/> <xsl:param name="attribute">filename</xsl:param> <xsl:param name="count">1</xsl:param> <xsl:choose> <xsl:when test="$count>count($pis)"> <!-- not found --> </xsl:when> <xsl:otherwise> <xsl:variable name="pi"> <xsl:value-of select="$pis[$count]"/> </xsl:variable> <xsl:choose> <xsl:when test="contains($pi,concat(' ', $attribute, '='))"> <xsl:variable name="rest" select="substring-after($pi,concat(' ', $attribute,'='))"/> <xsl:variable name="quote" select="substring($rest,1,1)"/> <xsl:value-of select="substring-before(substring($rest,2),$quote)"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="pi-attribute"> <xsl:with-param name="pis" select="$pis"/> <xsl:with-param name="attribute" select="$attribute"/> <xsl:with-param name="count" select="$count + 1"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="lookup.key"> <refnamediv> <refname>lookup.key</refname> <refpurpose>Retrieve the value associated with a particular key in a table</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>Given a table of space-delimited key/value pairs, the <function>lookup.key</function> template extracts the value associated with a particular key.</para> <programlisting><src:fragment id='lookup.key.frag'> <xsl:template name="lookup.key"> <xsl:param name="key" select="''"/> <xsl:param name="table" select="''"/> <xsl:if test="contains($table, ' ')"> <xsl:choose> <xsl:when test="substring-before($table, ' ') = $key"> <xsl:variable name="rest" select="substring-after($table, ' ')"/> <xsl:choose> <xsl:when test="contains($rest, ' ')"> <xsl:value-of select="substring-before($rest, ' ')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$rest"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="lookup.key"> <xsl:with-param name="key" select="$key"/> <xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> </src:fragment></programlisting> </refsect1> </refentry> <!-- ================================================================== --> <refentry id="xpath.location"> <refnamediv> <refname>xpath.location</refname> <refpurpose>Calculate the XPath child-sequence to the current node</refpurpose> </refnamediv> <refsect1><title>Description</title> <para>The <function>xpath.location</function> template calculates the absolute path from the root of the tree to the current element node. </para> <programlisting><src:fragment id='xpath.location.frag'> <xsl:template name="xpath.location"> <xsl:param ... [truncated message content] |
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/fo In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl/fo Added Files: ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl component.xsl division.xsl docbook.xsl ebnf.xsl fo-patch-for-fop.xsl fo-rtf.xsl fo.xsl footnote.xsl fop.xsl formal.xsl glossary.xsl graphics.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl math.xsl pagesetup.xsl param.ent param.xml param.xsl param.xweb passivetex.xsl pdf2index pi.xsl profile-docbook.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xml titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xep.xsl xref.xsl Log Message: DocBook XSL now in CVS --- NEW FILE: ChangeLog --- 2003-01-23 Norman Walsh <nw...@us...> * autotoc.xsl: Fix bugs associated with toc-context parameter in division.toc * division.xsl: Generate Part ToCs * pagesetup.xsl: Use proportional-column-width() for header/footer tables; suppress relative-align when when using FOP 2003-01-22 Norman Walsh <nw...@us...> * formal.xsl: Handle alignment correctly when screenshot is used in figure * xref.xsl: Format chapter and appendix titles consistently in xrefs 2003-01-21 Norman Walsh <nw...@us...> * formal.xsl: Attempt to support multiple tgroups (by making multiple tables and placing them right next to each other) * lists.xsl: Bug #653344: Output fo:table-columns in simplelist tables [...1188 lines suppressed...] * formal.xsl: Fixed typo * param.xsl: Added some new parameters * toc.xsl: Support DocBook toc markup 2001-04-03 Norman Walsh <nw...@us...> * callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters * param.xsl: Documentation fixes 2001-04-02 Norman Walsh <nw...@us...> * .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, docbook.xsl, fo.xsl, footnote.xsl, fop.xsl, formal.xsl, glossary.xsl, graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, pagesetup.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: New file. * Makefile: Use the cvstools version of saxon --- NEW FILE: admon.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- ******************************************************************** $Id: admon.xsl,v 1.1 2003/03/27 23:07:17 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <xsl:template match="note|important|warning|caution|tip"> <xsl:choose> <xsl:when test="$admon.graphics != 0"> <xsl:call-template name="graphical.admonition"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="nongraphical.admonition"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="admon.graphic.width"> <xsl:param name="node" select="."/> <xsl:text>36pt</xsl:text> </xsl:template> <xsl:template name="admon.graphic"> <xsl:param name="node" select="."/> <xsl:variable name="filename"> <xsl:value-of select="$admon.graphics.path"/> <xsl:choose> <xsl:when test="name($node)='note'">note</xsl:when> <xsl:when test="name($node)='warning'">warning</xsl:when> <xsl:when test="name($node)='caution'">caution</xsl:when> <xsl:when test="name($node)='tip'">tip</xsl:when> <xsl:when test="name($node)='important'">important</xsl:when> <xsl:otherwise>note</xsl:otherwise> </xsl:choose> <xsl:value-of select="$admon.graphics.extension"/> </xsl:variable> <xsl:choose> <xsl:when test="$passivetex.extensions != 0 or $fop.extensions != 0 or $arbortext.extensions != 0"> <xsl:value-of select="$filename"/> </xsl:when> <xsl:otherwise> <xsl:text>url(</xsl:text> <xsl:value-of select="$filename"/> <xsl:text>)</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="graphical.admonition"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="graphic.width"> <xsl:call-template name="admon.graphic.width"/> </xsl:variable> <fo:block id="{$id}"> <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt" provisional-label-separation="18pt" xsl:use-attribute-sets="list.block.spacing"> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block> <fo:external-graphic width="auto" height="auto" content-width="{$graphic.width}" > <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> </fo:external-graphic> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> <fo:block xsl:use-attribute-sets="admonition.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </fo:block> </xsl:template> <xsl:template name="nongraphical.admonition"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <fo:block space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em" start-indent="0.25in" end-indent="0.25in" id="{$id}"> <fo:block keep-with-next='always' xsl:use-attribute-sets="admonition.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> </fo:block> </xsl:template> <xsl:template match="note/title"></xsl:template> <xsl:template match="important/title"></xsl:template> <xsl:template match="warning/title"></xsl:template> <xsl:template match="caution/title"></xsl:template> <xsl:template match="tip/title"></xsl:template> </xsl:stylesheet> --- NEW FILE: autoidx.xsl --- <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> <!ENTITY sep '" "'> <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <!-- ******************************************************************** $Id: autoidx.xsl,v 1.1 2003/03/27 23:07:17 turin42 Exp $ ******************************************************************** This file is part of the DocBook XSL Stylesheet distribution. See ../README or http://docbook.sf.net/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <!-- Derived from Jeni Tennison's work in the HTML case --> <xsl:key name="letter" match="indexterm" use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:key name="primary" match="indexterm" use="&primary;"/> <xsl:key name="secondary" match="indexterm" use="concat(&primary;, &sep;, &secondary;)"/> <xsl:key name="tertiary" match="indexterm" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:key name="endofrange" match="indexterm[@class='endofrange']" use="@startref"/> <xsl:key name="see-also" match="indexterm[seealso]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/> <xsl:key name="see" match="indexterm[see]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/> <xsl:template name="generate-index"> <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> <xsl:variable name="terms" select="//indexterm[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;, &uppercase;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/> <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <fo:block> <xsl:if test="$others"> <xsl:call-template name="indexdiv.title"> <xsl:with-param name="titlecontent"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'index symbols'"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> <fo:block> <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-symbol-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> <xsl:apply-templates select="$alphabetical[count(.|key('letter', translate(substring(&primary;, 1, 1), &lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-div"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:if test="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <fo:block> <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> <xsl:call-template name="indexdiv.title"> <xsl:with-param name="titlecontent"> <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> </xsl:with-param> </xsl:call-template> </xsl:if> <fo:block> <xsl:apply-templates select="key('letter', $key)[&scope;] [count(.|key('primary', &primary;)[&scope;][1])=1]" mode="index-primary"> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </fo:block> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-symbol-div"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <fo:block> <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-primary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-primary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="&primary;"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="primary"/> <xsl:variable name="page-number-citations"> <xsl:for-each select="$refs[not(see) and not(seealso)]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(secondary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="$passivetex.extensions != '0'"> <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> <xsl:copy-of select="$page-number-citations"/> </fotex:sort> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$page-number-citations"/> </xsl:otherwise> </xsl:choose> </fo:block> <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> <fo:block start-indent="1pc"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="secondary"/> <xsl:variable name="page-number-citations"> <xsl:for-each select="$refs[not(see) and not(seealso)]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs[not(tertiary)]/*[self::see]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="$passivetex.extensions != '0'"> <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> <xsl:copy-of select="$page-number-citations"/> </fotex:sort> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$page-number-citations"/> </xsl:otherwise> </xsl:choose> </fo:block> <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> <fo:block start-indent="2pc"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" mode="index-tertiary"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="tertiary"/> <xsl:variable name="page-number-citations"> <xsl:for-each select="$refs[not(see) and not(seealso)]"> <xsl:apply-templates select="." mode="reference"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:if test="$refs/see"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </xsl:variable> <xsl:choose> <xsl:when test="$passivetex.extensions != '0'"> <fotex:sort xmlns:fotex="http://www.tug.org/fotex"> <xsl:copy-of select="$page-number-citations"/> </fotex:sort> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$page-number-citations"/> </xsl:otherwise> </xsl:choose> </fo:block> <xsl:if test="$refs/seealso"> <fo:block> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" mode="index-seealso"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference"> <xsl:param name="scope" select="."/> <xsl:param name="separator" select="', '"/> <xsl:if test="$passivetex.extensions = '0'"> <xsl:value-of select="$separator"/> </xsl:if> <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:if test="key('endofrange', @id)[&scope;]"> <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]" mode="reference"> <xsl:with-param name="scope" select="$scope"/> <xsl:with-param name="separator" select="'-'"/> </xsl:apply-templates> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference"> <xsl:param name="scope" select="."/> <xsl:param name="zones"/> <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:if test="$passivetex.extensions = '0'"> <xsl:text>, </xsl:text> </xsl:if> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="indexterm" mode="index-see"> <xsl:param name="scope" select="."/> <fo:inline> <xsl:text> (</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'see'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="see"/> <xsl:text>)</xsl:text> </fo:inline> </xsl:template> <xsl:template match="indexterm" mode="index-seealso"> <xsl:param name="scope" select="."/> <fo:block> <xsl:text>(</xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'seealso'"/> </xsl:call-template> <xsl:text> </xsl:text> <xsl:value-of select="seealso"/> <xsl:text>)</xsl:text> </fo:block> </xsl:template> <!-- ====================================================================== --> <xsl:template name="generate-index-markup"> <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter', translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/> <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <xsl:text><index> </xsl:text> <xsl:if test="$others"> <xsl:text> <indexdiv> </xsl:text> <xsl:text><title></xsl:text> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'index symbols'"/> </xsl:call-template> <xsl:text></title> </xsl:text> <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-symbol-div-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:text></indexdiv> </xsl:text> </xsl:if> <xsl:apply-templates select="$alphabetical[count(.|key('letter', translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:text></index> </xsl:text> </xsl:template> <xsl:template match="*" mode="index-markup"> <xsl:param name="scope" select="."/> <xsl:text><</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text>> </xsl:text> <xsl:apply-templates mode="index-markup"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:template> <xsl:template match="indexterm" mode="index-div-markup"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:text> <indexdiv> </xsl:text> <xsl:text><title></xsl:text> <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> <xsl:text></title> </xsl:text> <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-primary-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:text></indexdiv> </xsl:text> </xsl:template> <xsl:template match="indexterm" mode="index-symbol-div-markup"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" mode="index-primary-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:template> <xsl:template match="indexterm" mode="index-primary-markup"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="&primary;"/> <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> <xsl:text> <indexentry> </xsl:text> <xsl:text><primaryie></xsl:text> <xsl:text><phrase></xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="string(primary)"/> </xsl:call-template> <xsl:text></phrase></xsl:text> <xsl:if test="$pages">,</xsl:if> <xsl:text> </xsl:text> <xsl:for-each select="$pages"> <xsl:apply-templates select="." mode="reference-markup"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:text></primaryie> </xsl:text> <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> <xsl:text></indexentry> </xsl:text> </xsl:template> <xsl:template match="indexterm" mode="index-secondary-markup"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> <xsl:text><secondaryie></xsl:text> <xsl:text><phrase></xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="string(secondary)"/> </xsl:call-template> <xsl:text></phrase></xsl:text> <xsl:if test="$pages">,</xsl:if> <xsl:text> </xsl:text> <xsl:for-each select="$pages"> <xsl:apply-templates select="." mode="reference-markup"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:text></secondaryie> </xsl:text> <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" mode="index-see-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" mode="index-seealso-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" mode="index-tertiary-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary-markup"> <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> <xsl:text><tertiaryie></xsl:text> <xsl:text><phrase></xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="string(tertiary)"/> </xsl:call-template> <xsl:text></phrase></xsl:text> <xsl:if test="$pages">,</xsl:if> <xsl:text> </xsl:text> <xsl:for-each select="$pages"> <xsl:apply-templates select="." mode="reference-markup"> <xsl:with-param name="scope" select="$scope"/> </xsl:apply-templates> </xsl:for-each> <xsl:text></tertiaryie> </xsl:text> <xsl:variable name="see" select="$refs/see | $refs/seealso"/> <xsl:if test="$see"> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" mode="index-see-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> </xsl:apply-templates> <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" mode="index-seealso-markup"> <xsl:with-param name="scope" select="$scope"/> <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference-markup"> <xsl:param name="scope" select="."/> <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference-markup"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:choose> <xsl:when test="@startref and @class='endofrange'"> <xsl:text><phrase role="pageno"></xsl:text> <xsl:text><link linkend="</xsl:text> <xsl:value-of select="@startref"/> <xsl:text>"></xsl:text> <fo:basic-link internal-destination="{@startref}"> <fo:page-number-citation ref-id="{@startref}"/> <xsl:text>-</xsl:text> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:text></link></xsl:text> <xsl:text></phrase> </xsl:text> </xsl:when> <xsl:otherwise> <xsl:text><phrase role="pageno"></xsl:text> <xsl:if test="@id"> <xsl:text><link linkend="</xsl:text> <xsl:value-of select="$id"/> <xsl:text>"></xsl:text> </xsl:if> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:if test="@id"> <xsl:text></link></xsl:text> </xsl:if> <xsl:text></phrase> </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference-markup"> <xsl:param name="scope" select="."/> <xsl:param name="zones"/> <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> <xsl:text><phrase fole="pageno"></xsl:text> <xsl:if test="$target[1]/@id"> <xsl:text><link linkend="</xsl:text> <xsl:value-of select="$id"/> <xsl:text>"></xsl:text> </xsl:if> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:if test="$target[1]/@id"> <xsl:text></link></xsl:text> </xsl:if> <xsl:text></phrase> </xsl:text> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> <xsl:text><phrase role="pageno"></xsl:text> <xsl:if test="$target[1]/@id"> <xsl:text><link linkend="</xsl:text> <xsl:value-of select="$id"/> <xsl:text>"></xsl:text> </xsl:if> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> <xsl:if test="$target[1]/@id"> <xsl:text></link></xsl:text> </xsl:if> <xsl:text></phrase> </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="indexterm" mode="index-see-markup"> <xsl:param name="scope" select="."/> <fo:block> <xsl:text><seeie></xsl:text> <xsl:text><phrase></xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="string(see)"/> </xsl:call-template> <xsl:text></phrase></xsl:text> <xsl:text></seeie> </xsl:text> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-seealso-markup"> <xsl:param name="scope" select="."/> <fo:block> <xsl:text><seealsoie></xsl:text> <xsl:text><phrase></xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="string(seealso)"/> </xsl:call-template> <xsl:text></phrase></xsl:text> <xsl:text></seealsoie> </xsl:text> </fo:block> </xsl:template> <xsl:template name="escape-text"> <xsl:param name="text" select="''"/> <xsl:variable name="ltpos" select="substring-before($text, '<')"/> <xsl:variable name="amppos" select="substring-before($text, '&')"/> <xsl:choose> <xsl:when test="contains($text,'<') and contains($text, '&') and string-length($ltpos) < string-length($amppos)"> <xsl:value-of select="$ltpos"/> <xsl:text>&lt;</xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="substring-after($text, '<')"/> </xsl:call-template> </xsl:when> <xsl:when test="contains($text,'<') and contains($text, '&') and string-length($amppos) < string-length($ltpos)"> <xsl:value-of select="$amppos"/> <xsl:text>&amp;</xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="substring-after($text, '&')"/> </xsl:call-template> </xsl:when> <xsl:when test="contains($text, '<')"> <xsl:value-of select="$ltpos"/> <xsl:text>&lt;</xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="substring-after($text, '<')"/> </xsl:call-template> </xsl:when> <xsl:when test="contains($text, '&')"> <xsl:value-of select="$amppos"/> <xsl:text>&amp;</xsl:text> <xsl:call-template name="escape-text"> <xsl:with-param name="text" select="substring-after($text, '&')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> --- NEW FILE: autotoc.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- ******************************************************************** $Id: autotoc.xsl,v 1.1 2003/03/27 23:07:17 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template name="set.toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:variable name="nodes" select="book|setindex"/> <xsl:if test="$nodes"> <fo:block id="toc...{$id}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:call-template name="table.of.contents.titlepage"/> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template name="division.toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:variable name="nodes" select="$toc-context/part |$toc-context/reference |$toc-context/preface |$toc-context/chapter |$toc-context/appendix |$toc-context/article |$toc-context/bibliography |$toc-context/glossary |$toc-context/index"/> <xsl:if test="$nodes"> <fo:block id="toc...{$cid}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:call-template name="table.of.contents.titlepage"/> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template name="component.toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:variable name="nodes" select="section|sect1|refentry |article|bibliography|glossary |appendix"/> <xsl:if test="$nodes"> <fo:block id="toc...{$id}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:call-template name="table.of.contents.titlepage"/> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template name="component.toc.separator"> <!-- Customize to output something between component.toc and first output --> </xsl:template> <xsl:template name="section.toc"> <xsl:param name="toc-context" select="."/> <xsl:param name="toc.title.p" select="true()"/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:variable name="nodes" select="section|sect1|sect2|sect3|sect4|sect5|refentry |bridgehead[$bridgehead.in.toc != 0]"/> <xsl:variable name="level"> <xsl:call-template name="section.level"/> </xsl:variable> <xsl:if test="$nodes"> <fo:block id="toc...{$id}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:if test="$toc.title.p"> <xsl:call-template name="section.heading"> <xsl:with-param name="level" select="$level + 1"/> <xsl:with-param name="title"> <fo:block space-after="0.5em"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template> </fo:block> </xsl:with-param> </xsl:call-template> </xsl:if> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template name="section.toc.separator"> <!-- Customize to output something between section.toc and first output --> </xsl:template> <!-- ==================================================================== --> <xsl:template name="toc.line"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <fo:block text-align-last="justify" end-indent="{$toc.indent.width}pt" last-line-end-indent="-{$toc.indent.width}pt"> <fo:inline keep-with-next.within-line="always"> <fo:basic-link internal-destination="{$id}"> <xsl:if test="$label != ''"> <xsl:copy-of select="$label"/> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <xsl:apply-templates select="." mode="title.markup"/> </fo:basic-link> </fo:inline> <fo:inline keep-together.within-line="always"> <xsl:text> </xsl:text> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <xsl:text> </xsl:text> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> </fo:inline> </fo:block> </xsl:template> <!-- ==================================================================== --> <xsl:template match="book|setindex" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="nodes" select="glossary|bibliography|preface|chapter |reference|part|article|appendix|index"/> <xsl:if test="$toc.section.depth > 0 and $nodes"> <fo:block id="toc.{$cid}.{$id}" start-indent="{count(ancestor::*)*$toc.indent.width}pt"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="part" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="nodes" select="chapter|appendix|preface|reference"/> <xsl:if test="$toc.section.depth > 0 and $nodes"> <fo:block id="toc.{$cid}.{$id}" start-indent="{count(ancestor::*)*$toc.indent.width}pt"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="reference" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:if test="$toc.section.depth > 0 and refentry"> <fo:block id="toc.{$cid}.{$id}" start-indent="{count(ancestor::*)*$toc.indent.width}pt"> <xsl:apply-templates select="refentry" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="refentry" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="toc.line"/> </xsl:template> <xsl:template match="preface|chapter|appendix|article" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="nodes" select="section|sect1"/> <xsl:if test="$toc.section.depth > 0 and $nodes"> <fo:block id="toc.{$cid}.{$id}" start-indent="{count(ancestor::*)*$toc.indent.width}pt"> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="sect1" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:if test="$toc.section.depth > 1 and sect2"> <fo:block id="toc.{$cid}.{$id}" start-indent="{count(ancestor::*)*$toc.indent.width}pt"> <xsl:apply-templates select="sect2" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="sect2" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="reldepth" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth > 2 and sect3"> <fo:block id="toc.{$cid}.{$id}" start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect3" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="sect3" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="reldepth" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth > 3 and sect4"> <fo:block id="toc.{$cid}.{$id}" start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect4" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="sect4" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="toc.line"/> <xsl:variable name="reldepth" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth > 4 and sect5"> <fo:block id="toc.{$cid}.{$id}" start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect5" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="sect5" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="toc.line"/> </xsl:template> <xsl:template match="section" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> </xsl:call-template> </xsl:variable> <xsl:variable name="depth" select="count(ancestor::section) + 1"/> <xsl:variable name="reldepth" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth >= $depth"> <xsl:call-template name="toc.line"/> <xsl:if test="$toc.section.depth > $depth and section"> <fo:block id="toc.{$cid}.{$id}" start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="section" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:if> </xsl:template> <xsl:template match="bibliography|glossary" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="toc.line"/> </xsl:template> <xsl:template match="index" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:if test="* or $generate.index != 0"> <xsl:call-template name="toc.line"/> </xsl:if> </xsl:template> <xsl:template match="title" mode="toc"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template name="list.of.titles"> <xsl:param name="titles" select="'table'"/> <xsl:param name="nodes" select=".//table"/> <xsl:param name="toc-context" select="."/> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:if test="$nodes"> <fo:block id="lot...{$titles}...{$id}"> <xsl:choose> <xsl:when test="$titles='table'"> <xsl:call-template name="list.of.tables.titlepage"/> </xsl:when> <xsl:when test="$titles='figure'"> <xsl:call-template name="list.of.figures.titlepage"/> </xsl:when> <xsl:when test="$titles='equation'"> <xsl:call-template name="list.of.equations.titlepage"/> </xsl:when> <xsl:when test="$titles='example'"> <xsl:call-template name="list.of.examples.titlepage"/> </xsl:when> <xsl:when test="$titles='procedure'"> <xsl:call-template name="list.of.procedures.titlepage"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="list.of.unknowns.titlepage"/> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="$nodes" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="figure|table|example|equation|procedure" mode="toc"> <xsl:call-template name="toc.line"/> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: biblio.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- ******************************************************************** $Id: biblio.xsl,v 1.1 2003/03/27 23:07:17 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template match="bibliography"> <xsl:variable name="id"> [...1041 lines suppressed...] <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> </xsl:template> <xsl:template match="volumenum" mode="bibliomixed.mode"> <fo:inline> <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> </xsl:template> <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" mode="bibliomixed.mode"> <fo:inline> <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet> --- NEW FILE: block.xsl --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- ******************************************************************** $Id: block.xsl,v 1.1 2003/03/27 23:07:17 turin42 Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. See ../README or http://nwalsh.com/docbook/xsl/ for copyright and other information. ******************************************************************** --> <!-- ==================================================================== --> <xsl:template name="block.object"> <fo:block> <xsl:apply-templates/> </fo:block> </xsl:template> <!-- ==================================================================== --> <xsl:template match="para"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="simpara"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="formalpara"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="formalpara/title"> <xsl:variable name="titleStr" select="."/> <xsl:variable name="lastChar"> <xsl:if test="$titleStr != ''"> <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/> </xsl:if> </xsl:variable> <fo:inline font-weight="bold" keep-with-next.within-line="always" padding-end="1em"> <xsl:apply-templates/> <xsl:if test="$lastChar != '' and not(contains($runinhead.title.end.punct, $lastChar))"> <xsl:value-of select="$runinhead.default.title.end.punct"/> </xsl:if> <xsl:text> </xsl:text> </fo:inline> </xsl:template> <xsl:template match="formalpara/para"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="blockquote"> <fo:block xsl:use-attribute-sets="blockquote.properties"> <xsl:call-template name="anchor"/> <fo:block> <xsl:if test="title"> <fo:block xsl:use-attribute-sets="formal.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> </xsl:if> <xsl:apply-templates select="*[local-name(.) != 'title' and local-name(.) != 'attribution']"/> </fo:block> <xsl:if test="attribution"> <fo:block text-align="right"> <!-- mdash --> <xsl:text>—</xsl:text> <xsl:apply-templates select="attribution"/> </fo:block> </xsl:if> </fo:block> </xsl:template> <xsl:template match="epigraph"> <fo:block> <xsl:call-template name="anchor"/> <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> <fo:inline> <xsl:text>--</xsl:text> <xsl:apply-templates select="attribution"/> </fo:inline> </fo:block> </xsl:template> <xsl:template match="attribution"> <fo:inline><xsl:apply-templates/></fo:inline> </xsl:template> <!-- ==================================================================== --> <xsl:template match="sidebar"> <fo:block xsl:use-attribute-sets="sidebar.properties"> <xsl:if test="./title"> <fo:block font-weight="bold" keep-with-next.within-column="always" hyphenate="false"> <xsl:apply-templates select="./title" mode="sidebar.title.mode"/> </fo:block> </xsl:if> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="sidebar/title"> </xsl:template> <xsl:template match="sidebar/title" mode="sidebar.title.mode"> <xsl:apply-templates/> </xsl:template> <!-- ==================================================================== --> <xsl:template match="abstract"> <fo:block> <xsl:if test="@id"> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> </xsl:if> <xsl:call-template name="formal.object.heading"> <xsl:with-param name="title"> <xsl:apply-templates se... [truncated message content] |
From: <tu...@us...> - 2003-03-27 23:07:18
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl In directory sc8-pr-cvs1:/tmp/cvs-serv25158/doc/reference/lib/docbook-xsl Added Files: VERSION Log Message: DocBook XSL now in CVS --- NEW FILE: VERSION --- <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:param name="VERSION">1.60.1</xsl:param> </xsl:stylesheet> |
From: <tu...@us...> - 2003-03-27 23:03:38
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24817/doc/reference/lib/docbook-xsl/lib Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/lib added to the repository |
From: <tu...@us...> - 2003-03-27 23:03:13
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/html In directory sc8-pr-cvs1:/tmp/cvs-serv24638/doc/reference/lib/docbook-xsl/html Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/html added to the repository |
From: <tu...@us...> - 2003-03-27 23:02:47
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/fo In directory sc8-pr-cvs1:/tmp/cvs-serv24463/doc/reference/lib/docbook-xsl/fo Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/fo added to the repository |
From: <tu...@us...> - 2003-03-27 23:02:23
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/common In directory sc8-pr-cvs1:/tmp/cvs-serv24273/doc/reference/lib/docbook-xsl/common Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl/common added to the repository |
From: <tu...@us...> - 2003-03-27 23:02:02
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl In directory sc8-pr-cvs1:/tmp/cvs-serv24121/doc/reference/lib/docbook-xsl Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib/docbook-xsl added to the repository |
From: <tu...@us...> - 2003-03-27 23:01:51
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24038/doc/reference/lib Log Message: Directory /cvsroot/hibernate/Hibernate2/doc/reference/lib added to the repository |
From: <tu...@us...> - 2003-03-27 23:01:25
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/pdf In directory sc8-pr-cvs1:/tmp/cvs-serv23426/doc/reference/pdf Removed Files: hibernate_reference.pdf Log Message: No longer needed, generated with build.xml --- hibernate_reference.pdf DELETED --- |
From: <tu...@us...> - 2003-03-27 23:01:15
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/html_single In directory sc8-pr-cvs1:/tmp/cvs-serv23426/doc/reference/html_single Removed Files: index.html Log Message: No longer needed, generated with build.xml --- index.html DELETED --- |