[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt processing order

Subject: Re: xslt processing order
From: "Ilya Lifshits" <chehlo@xxxxxxxxx>
Date: Wed, 16 Apr 2008 14:47:45 +0300
Re:  xslt processing order
Thanks,

I added the include to the xsl file and problem fixed.

Ilya.


On Tue, Apr 15, 2008 at 11:40 PM, Manfred Staudinger
<manfred.staudinger@xxxxxxxxx> wrote:
> Hi Ilya,
>
>
>  >  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.
>  Before XSLT processing can start, both the input XML and the
>  stylesheet have to be processed by the XML parser (get "parsed* into a
>  node-tree). It seems the parser cannot find the line
>
> >  <!ENTITY usb_spec_ref_name "USB Specification">
>  in first_stage.xsl, where it has found the entity. If you would
>  include it (or preemble.ent) at the beginning of your XSLT it would
>  parse.
>
>
>  >  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.
>  Correct, the XSLT gets parsed first. The XSLT processor acts on the
>  node-tree, so it has done nothing up to that point.
>
>  Regards,
>
>  Manfred
>
>
>
>  On 15/04/2008, Ilya Lifshits <chehlo@xxxxxxxxx> wrote:
>  > 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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.