Mailing List
Home
Cocoon - MVC web framework based on XML/XSL
Maven - Project building tool
Ant - A Java building tool
Axis - Java SOAP implementation
Lucene - Full-featured text search engine APIs
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
Log4J - A log library
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database, Microsoft SQL server ...
MySQL - an open source database
Red Hat Linux Installation and Config discussions ...
Click here to subscribe to Jakatar mailing list
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Servlet File Download dialog problem (IE6,Adobe 6 0)
Proposal: Adding jar manifest classpath in jar and war plugins
Unsupported major minor version 48 0 problem while running the an
   telope task
java security AccessControlException: access denied (java io FilePermission
axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
jsp data into Excel
Classpath problem
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Running junit tests fails
XDoclet, Struts and Maven: Where to start? SOLUTION
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
AXIS: tomcat timeout ?
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
One-to-one file mapping

One-to-one file mapping

2004-02-18       - By Holbrook, R Cody (Cody)

 Back
Reply:     1     2     3     4     5  



*edit, fixed typos on my part...


Matt,

Thanks for the interest in the problem. I apologize for overlapping. Essentially, here 's what I 'm currently doing. A XML file (containing documentation) is passed through a stylesheet (XSL) to create a new XSL. The XSDs are run through the new stylesheet and result in XSDs with documentation. The XSDs run through the castor target generate java code. The java also has the documentation. Simply run javadoc against the newly generated java and you 've got product documentation in HTML format.

That 's all well and good, but as the code base has grown, the original documentation has grown into something that will soon be unmanageable.

So here 's what I 'm looking to do. Let 's say that I have 10 XSDs. I know each one 's name and will not change them. Originally, one XML was used to hold the documentation for all 10 XSDs, but now, I want to break the file up into 10 pieces. Each XML filename will look exactly like it 's XSD counter part (a.xml contains documentation only for a.xsd, same with b.xml:b.xsd, etc.). These XML files have already been created.

What I need ant to do is match these files up correctly. So using the process I 've established, here 's what will happen:

b.xml goes through stylesheet to become b.xsl (this already happens to all XML in ${documentation})

b.xsd is passed through b.xsl to become a new b.xsd containing the documentation from b.xml.

Here 's what a single target would look like:

    <target name= "create-xsl " depends= "create-src " description= "Create xsl from xml " >
       <xslt basedir= "${documentation} " destdir= "${xsl.gen} " style= "${xsl}/stylesheet.xsl " extension= ".xsl " >
       </xslt >
    </target >
   
    <target name= "create-xsd " depends= "create-xsl " description= "Create xsd using xsl " >
       <xslt basedir= "${xsd} " destdir= "${xsd.gen} " style= "${xsl.gen}/b.xsl " extension= ".xsd "
         includes= "b.xsd " > </xslt >
    </target >

So here you can see that the create-xsl target isn 't interested in file names. It simply passes all XML files in ${documentation} through stylesheet.xsl to create more XSL files.

Target create-xsd, however, needs to be told exactly what XSL and XSD to use. This works, and I could just make a create-xsd target for each XSD I need processed. But there are several 100 and that makes for a big build.xml. Also, new XSDs are added every week or so, making maintenance of the build file frequent and tedious work.

What I don 't understand how to do is how to change the create-xsd target to make it do perfect matches of the XSL identified in style and the XSD identified in includes. Wildcards don 't work (ie *.xsl, *.xsd) because each XSL runs against each XSD and it 's a messy and long process! Any ideas?

Thanks,

Cody Holbrook



--- "Holbrook, R Cody (Cody) " <rch7@(protected) > wrote:
> Is there a good way, without making a bevy of
> targets to cover all the xml files, to match 1-to-1
> XML-to-XSD (a.xml only interacts with a.xsd, etc.)?


Cody:

Without my having any experience working with the xslt
task, can you elaborate a little on what you want to
happen per a,b,...,z file pair?

Thanks,
Matt

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)