[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Calling java application during a parsing
David Delgranche wrote: > I have a question without knowing if it's an XSLT question or more a > xalan question. I hope someone would help me. > I have two XML schemas linking with an <xsl:include > href="secondSchema.xsd"/> in the first one. My question is: xsl:include is for combining stylesheets. > Is it possible in an xslt stylesheet to invoque a java parser command > when finding the xsl:include tag? In some situations you can invoke java methods using extension functions, but xsl:include does not allow functions as arguments, including extension functions. As Eric mentioned, it sounds like you want to use the document() function to access the root nodes of 2 different XML documents. <!-- use variables for convenience --> <xsl:variable name="schema1Root" select="document('firstschema.xsd')"/> <xsl:variable name="schema2Root" select="document('firstschema.xsd')"/> <xsl:variable name="schema1Param" select="$schema1Root/path/to/parameter"/> <!-- nodes with string values matching the parameter node's string value --> <xsl:for-each select="$schema2Root/path/to/nodes[.=$schema1Param]"> ... </xsl:for-each> <!-- element nodes with names matching the parameter node's string value --> <xsl:for-each select="$schema2Root/path/to/nodes[name()=$schema1Param]"> ... </xsl:for-each> ...just as an example. - Mike ____________________________________________________________________ Mike J. Brown, software engineer at My XML/XSL resources: webb.net in Denver, Colorado, USA http://skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|