Relaxer/Options のバックアップ(No.3)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- Relaxer/Options へ行く。
- 1 (2005-01-07 (金) 07:06:49)
- 2 (2005-01-12 (水) 06:06:43)
- 3 (2005-04-15 (金) 05:17:46)
- 4 (2005-04-15 (金) 05:17:46)
- 5 (2005-04-28 (木) 04:32:43)
- 6 (2005-06-15 (水) 02:07:28)
- 7 (2005-06-26 (日) 12:48:00)
- 8 (2005-09-02 (金) 14:07:11)
- 9 (2005-10-13 (木) 16:05:27)
- 10 (2006-04-11 (火) 12:31:00)
- 11 (2006-05-29 (月) 10:33:26)
- 12 (2006-09-12 (火) 16:04:35)
- 13 (2006-11-10 (金) 13:52:36)
- 14 (2006-11-11 (土) 14:47:42)
- 15 (2007-03-13 (火) 00:26:29)
- 16 (2007-06-28 (木) 15:50:43)
- 17 (2007-07-26 (木) 14:15:46)
- 18 (2010-12-17 (金) 15:44:26)
- 19 (2010-12-19 (日) 18:57:12)
- 20 (2011-12-16 (金) 15:03:49)
- 21 (2018-07-09 (月) 17:13:47)
- 22 (2019-05-22 (水) 19:34:28)
Terai Atsuhiro 2018-07-09 (月) 17:13:47
Common
verbose
C:\fo\>relaxer -verbose xslfo.rng Copyright(c) 2000-2004 ASAMI,Tomoharu. All rights reserved. Relaxer Version 1.1b (20040405) by asami@relaxer.org Source file : file:/C:/fo/xslfo.rng artifact = IXslStylesheetChoice.java artifact = IXslTemplateMixed.java artifact = IXslTemplateMixedChoice.java artifact = IFoBlockContainerMixed.java
properties
relaxer -properties:hogehoge.properties relax/hoge.rng
dir
-
-dir:./target/src/java -dir:c:\temp\target\src -dir:file://localhost/c:/temp/target/src
-
dir=./target/src/java dir=c:\temp\target\src dir=file://localhost/c:/temp/target/src
dir.package
dir=src dir.package=true java.package.library=jp.ne.test.hoge.relaxer.lib
src\jp\ne\test\hoge\relaxer\lib
Java
java.package
java.package=jp.ne.test.hoge.relaxer
package jp.ne.test.hoge.relaxer;
java.package.library
java.package.library=jp.ne.test.hoge.relaxer.lib
java.name.class.prefix
-
-java.name.class.prefix:Hoge
-
java.name.class.prefix=Hoge
java.name.class.prefixes
-
<?xml version="1.0" encoding="Shift_JIS"?> <grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/XSL/Format" >
-
#Relaxer.properties java.xml.namespace=true java.name.class.prefixes=http://xxx.jp/Transform:Xsl,http://xxx.jp/Format:Fo
-
prepare-src: [mkdir] Created dir: C:\fo\target\src [java] Copyright(c) 2000-2004 ASAMI,Tomoharu. All rights reserved. [java] Relaxer Version 1.1b (20040203) by asami@relaxer.org [java] Property file : C:\fo/Relaxer.properties [java] Source file : file:/C:/fo/src/relaxng/xslfo.rng [java] artifact = XslAttributeSet.java [java] artifact = FoLayoutMasterSet.java
Pattern
java.pattern.factory
FoRoot root = new FoRoot();
FondocFactory.setFactory(new XslfonFactory());
IFondocFactory factory = FondocFactory.getFactory(); FoRoot root = factory.createFoRoot();
public class XslfonFactory extends DefaultFondocFactory{ /** * Creates a default <code>FoRoot</code>. * This method is a hook method of the AbstractXslfoFactory. * * @return FoRoot */ /** * Creates a default <code>XslTemplate</code>. * This method is a hook method of the AbstractFondocFactory. * * @return XslTemplate */ public XslTemplate createXslTemplate() { XslTemplate node = new XslTemplate(){ public void verify(RVerifyReport report, int index, RVerifyContext context){ super.verify(report, index, context); report = report.newContext("template"); String strMatch = getMatch(); String strName = getName(); if(strMatch==null && strName==null){ report.addError( "@match|@name",index,RVerifyReport.INVALID_VALUE,"","string", ); return; } } }; node.rGetRNSContext().declareNamespace( "xsl", "http://www.w3.org/1999/XSL/Transform" ); return node; //return (new XslTemplate()); } }
java.pattern.visitor
MasterNameVisitor mnv = new MasterNameVisitor(); URVisitor.traverse(root, mnv); //Vector simplePageMasterList = mnv.getSimplePageMasterList(); Vector masterNameList = mnv.getMasterNameList(); JComboBox referenceComboBox = new JComboBox(masterNameList);
public class MasterNameVisitor extends RVisitorBase{ private final Vector namelist = new Vector(); private final Vector list = new Vector(); public Vector getMasterNameList(){ return namelist; } public Vector getSimplePageMasterList(){ return list; } public boolean enter(FoSimplePageMaster visitable) { list.add(visitable); namelist.add(visitable.getMasterName()); Logger.global.info("addMasterNameList "+visitable.getMasterName()); return(true); } }
XslRoot root = new XslRoot("test.xml"); final Vector namelist = new Vector(); URVisitor.traverse(root, new RVisitorBase() { public boolean enter(FoSimplePageMaster visitable) { //Logger.global.info("addMasterName "+visitable.getMasterName()); namelist.add(visitable.getMasterName()); return(true); } }); JComboBox referenceComboBox = new JComboBox(namelist);
java.pattern.idmap
Swing
java.swing.comboBox(java.swing.list)
<define name="account"> <element name="account"> <attribute name="accountNo"> <choice> <value>A12345</value> <value>B23456</value> <value>C34567</value> </choice> </attribute>
JComboBox accountNoComboBox = new JComboBox(account.swingComboBoxAccountNo());
Java/Extension Grammar
java:role
<?xml version="1.0" encoding="UTF-8" ?> <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns:java="http://www.relaxer.org/xmlns/relaxer/java"> <start> <choice> <ref name="person"/> <ref name="company"/> </choice> </start> <define name="person"> <element name="person" java:role="ICommon"> <ref name="common"/> </element> </define> <define name="company"> <element name="company" java:role="ICommon"> <ref name="common"/> </element> </define> <define name="common"> <attribute name="zip"> <data type="token"/> </attribute> <element name="address"> <data type="token"/> </element> </define> </grammar>
<element name="company" java:role="ICommon IFontProperties IBorderProperies">
java:default
<optional> <attribute name="column-count" java:default="1"> <data type="int"/> </attribute> </optional> <optional> <attribute name="column-gap" java:default="12.0pt"> <data type="string"/> </attribute> </optional> <optional> <attribute name="padding-start.conditionality" java:default="discard"> <choice> <value type="NMTOKEN">discard</value> <value type="NMTOKEN">retain</value> </choice> </attribute> </optional>
public final String getColumnGap() { if (columnGap_ == null) { return ("12.0pt"); } return (columnGap_); } public final String getPaddingStartConditionality() { if (paddingStartConditionality_ == null) { return ("discard"); } return (paddingStartConditionality_); }
<element name="string" java:className="Hoge"> <empty/> </element>
public void makeTextElement(StringBuffer buffer) { int size; buffer.append("<string"); buffer.append(">"); buffer.append("</string>"); }
<define name="aaa"> <element name="aaa" java:extends="jp.ne.hoge.Company" java:implements="jp.ne.hoge.ICompany"> <ref name="common"/> </element> </define>
public class Aaa extends jp.ne.hoge.Company implements jp.ne.hoge.ICompany, java.io.Serializable, Cloneable, IRNode {
java:abstract
<define name="company"> <element name="company" java:abstract="true" java:extends="jp.ne.hoge.AbstractCompany"> <ref name="common"/> </element> </define>
public abstract class Company extends jp.ne.hoge.AbstractCompany implements java.io.Serializable, Cloneable, IRNode {
java:mapKey
java:code
<define name="account"> <element name="account"> <ref name="address"/> <zeroOrMore> <ref name="phone"/> </zeroOrMore> <java:code xmlns:java="http://www.relaxer.org/xmlns/relaxer/java"> public boolean isOk() { return (true); } </java:code> </element> </define>