xsl-list
[Top] [All Lists]

[xsl] xslt processing order

2008-04-15 13:05:59
Hi,

I have a problem using entities in named template. To fix the problem
i want to understand how processing of xsl is working.
In my situation i have  one xml file that include preamble.ent with
some entities defined in there.  I'm, processing this file this some
xsl with number of templates to another xml.
Then i try using any of the entities in xml file it's work as
expected, but if i use any entity in the template i got the following
error:

Error on line 369 column 28 of
file:/C:/cygwin/home/ilya/srcs/private/xml/first_stage.xsl:
  SXXP0003: Error reported by XML parser: The entity
"usb_spec_ref_name" was referenced, but
  not declared.

I'm using saxon 9. and xslt 2.0.

Command line:

java -jar c:/utils/saxon/java/saxon9.jar  -s:ut_man.xml -xi:on
-xsl:first_stage.xsl -o:out/ut_man_docbook.xml

the snipsets of the relevant part of the files are the following :
preemble.ent
------------------
<!ENTITY usb_spec_ref_name "USB Specification">

ut_man.xml
-----------------
<listitem>
                <j_desc_verify/>
<listitem>


first_stage.xsl
--------------------

<xsl:template match="j_desc_verify">
    <xsl:param name="param" select="Verify"/>
    <xsl:value-of select="$param"/> that the returned descriptor
compiles with the
        &usb_spec_ref_name;
</xsl:template>

Just a solution will be good, but the explanation why it's happened
will be much better :) It will be nice to understand the
transformation process at the level i understand compilation stages of
C code. It seems like the error i got is some sanity validation before
the actual transformation is started since it's happened very fast and
the template is used at the end of quite big document.

Regards Ilya.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>