You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by rd...@apache.org on 2004/02/11 00:09:53 UTC

cvs commit: ws-jaxme/src/documentation/manual marshalling.xml

rdonkin     2004/02/10 15:09:53

  Modified:    src/documentation/manual marshalling.xml
  Log:
  Reformatted some example code that I found hard to read. Unless there are any objections to this style, I'll probably make some more alterations along these lines.
  
  Revision  Changes    Path
  1.2       +25 -14    ws-jaxme/src/documentation/manual/marshalling.xml
  
  Index: marshalling.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/documentation/manual/marshalling.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- marshalling.xml	23 Sep 2003 12:36:57 -0000	1.1
  +++ marshalling.xml	10 Feb 2004 23:09:53 -0000	1.2
  @@ -109,21 +109,32 @@
   		      </para>
   		    <example><title>Transformation of a JaxMe object using an XSL stylesheet</title>
   		      <programlisting>
  -	public void transformToFile(JAXBContext pContext, Object pObject,
  -	                            TransformerFactory pFactory, String pStylesheetFileName,
  +	public void transformToFile(JAXBContext pContext, 
  +                                Object pObject,
  +	                            TransformerFactory pFactory, 
  +                                String pStylesheetFileName,
   	                            String pOutputFileName)
  -	    throws JAXBException, TransformerConfigurationException {
  -      javax.xml.transform.Source stylesheetSource =
  -        new javax.xml.transform.StreamSource(new java.io.File(pStylesheetFileName));
  -      javax.xml.transform.Result outputResult =
  -        new javax.xml.transform.StreamResult(new java.io.File(pOutputFileName));
  -      javax.xml.transform.sax.TransformerHandler handler =
  -        ((SAXTransformerFactory) pFactory).newTransformerHandler(stylesheetSource);
  -      handler.setResult(outputResult);
  -      handler.getTransformer().setOutputProperty("output.encoding", "UTF-8");
  -      Marshaller marshaller = pContext.createMarshaller();
  -      marshaller.marshal(pObject, handler);
  -	}
  +                                    throws 
  +                                        JAXBException, 
  +                                        TransformerConfigurationException {
  +                                        
  +          javax.xml.transform.Source stylesheetSource =
  +                        new javax.xml.transform.StreamSource(
  +                                    new java.io.File(pStylesheetFileName));
  +                                    
  +          javax.xml.transform.Result outputResult =
  +                        new javax.xml.transform.StreamResult(
  +                                    new java.io.File(pOutputFileName));
  +                                    
  +          javax.xml.transform.sax.TransformerHandler handler =
  +                    ((SAXTransformerFactory) pFactory).newTransformerHandler(stylesheetSource);
  +                    
  +          handler.setResult(outputResult);
  +          handler.getTransformer().setOutputProperty("output.encoding", "UTF-8");
  +          
  +          Marshaller marshaller = pContext.createMarshaller();
  +          marshaller.marshal(pObject, handler);
  +    }
   		      </programlisting>
   		    </example>
   		    <note>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org