[jsword-svn] jsword/java/jsword/org/crosswire/jsword/examples s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Dec 31 20:07:07 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/examples
In directory www.crosswire.org:/tmp/cvs-serv15047/java/jsword/org/crosswire/jsword/examples
Modified Files:
APIExamples.java
Log Message:
Updated tooling (Note could not upgrade checkstyle)
Index: APIExamples.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/examples/APIExamples.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** APIExamples.java 15 Sep 2005 04:39:32 -0000 1.27
--- APIExamples.java 1 Jan 2006 03:07:05 -0000 1.28
***************
*** 104,113 ****
TransformingSAXEventProvider htmlsep = (TransformingSAXEventProvider) styler.convert(osissep);
!
// You can also pass parameters to the xslt. What you pass depends upon what the xslt can use.
BookMetaData bmd = bible.getBookMetaData();
boolean direction = bmd.isLeftToRight();
htmlsep.setParameter("direction", direction ? "ltr" : "rtl"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
!
// Finally you can get the styled text.
String text = XMLUtil.writeToString(htmlsep);
--- 104,113 ----
TransformingSAXEventProvider htmlsep = (TransformingSAXEventProvider) styler.convert(osissep);
!
// You can also pass parameters to the xslt. What you pass depends upon what the xslt can use.
BookMetaData bmd = bible.getBookMetaData();
boolean direction = bmd.isLeftToRight();
htmlsep.setParameter("direction", direction ? "ltr" : "rtl"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
!
// Finally you can get the styled text.
String text = XMLUtil.writeToString(htmlsep);
***************
*** 154,163 ****
System.out.println("The following verses contain both moses and aaron: " + key.getName()); //$NON-NLS-1$
!
// You can also trim the result to a more managable quantity.
// The test here is not necessary since we are working with a bible. It is necessary if we don't know what it is.
if (key instanceof Passage)
{
! Passage remaining = ((Passage)key).trimVerses(5);
System.out.println("The first 5 verses containing both moses and aaron: " + key.getName()); //$NON-NLS-1$
System.out.println("The rest of the verses are: " + remaining.getName()); //$NON-NLS-1$
--- 154,163 ----
System.out.println("The following verses contain both moses and aaron: " + key.getName()); //$NON-NLS-1$
!
// You can also trim the result to a more managable quantity.
// The test here is not necessary since we are working with a bible. It is necessary if we don't know what it is.
if (key instanceof Passage)
{
! Passage remaining = ((Passage) key).trimVerses(5);
System.out.println("The first 5 verses containing both moses and aaron: " + key.getName()); //$NON-NLS-1$
System.out.println("The rest of the verses are: " + remaining.getName()); //$NON-NLS-1$
***************
*** 215,219 ****
// Here is an example of how to iterate over the ranges and get the text for each
// The key's iterator would have iterated over verses.
!
// The following shows how to use a stylesheet of your own choosing
String path = "xsl/cswing/simple.xsl"; //$NON-NLS-1$
--- 215,219 ----
// Here is an example of how to iterate over the ranges and get the text for each
// The key's iterator would have iterated over verses.
!
// The following shows how to use a stylesheet of your own choosing
String path = "xsl/cswing/simple.xsl"; //$NON-NLS-1$
More information about the jsword-svn
mailing list