Altova Mailing List Archives


RE: [xsl] handling tags and PIs within a macro

From: Nancy Brandt <nancy_brndt@--------->
To:
Date: 10/23/2007 2:52:00 PM
Hi Michael,

So how do you explain the fact that those macros are
parsed properly by the XSLTPROC according to the
defined templates, unless the macro contains the
mentioned problematic items? To add more information,
I am using Docbook XML.

Best regards,
Nancy

--- Michael Kay <mike@xxxxxxxxxxxx> wrote:

> XSLT can only handle well-formed XML input
> documents. Your input is not
> well-formed XML (in other words, it is not XML at
> all, since there is no
> other kind). Sorry, but XML is the name of this game
> and you can't break the
> rules.
> 
> Michael Kay
> http://www.saxonica.com/
>  
> 
> > -----Original Message-----
> > From: Nancy Brandt [mailto:nancy_brndt@xxxxxxxxx] 
> > Sent: 23 October 2007 15:10
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: [xsl] handling tags and PIs within a
> macro
> > 
> > Hi guys,
> > 
> > I have created templates by the help of which, the
> compiler 
> > will parse my macros for graphics, chunks of table
> entries, 
> > etc. The problem is that when a macro is parsed by
> its 
> > template defined in .xsl file, the compiler cannot
> handle 
> > such processing instructions as <sbr\>, <xref.../>
>  
> > <command>, etc that are within the macro's text.
> The compiler says:
> > parser error : Unescaped '<' not allowed in
> attributes 
> > values. How do I create a template within each
> macro 
> > template, so that those processing instructions in
> the <> 
> > format will be handled regularly, without changing
> their 
> > format to &lt;...&gt;?
> > 
> > Please, advise!
> > 
> > P.S. here is an example of a table row macro (and
> within this 
> > row there could be all these problematic PIs.
> > 
> > <xsl:template match="j_entry">
> > <row>
> >   <entry>
> >   <xsl:element name="formalpara">
> >     <xsl:attribute name="id">
> >       <xsl:value-of select="@fid"/>
> >      </xsl:attribute>
> >      <title>
> >        <xsl:value-of select="@cmd"/>
> >      </title>
> >   </xsl:element>
> > 
> >   <formalpara>
> >     <title>Description</title>
> >     <xsl:value-of select="@dsc"/>
> >   </formalpara>
> > 
> >   <formalpara>
> >     <title>Relevant to</title>
> >     <xsl:value-of select="@rel"/>
> >   </formalpara>
> > 
> >   <formalpara>
> >     <title>Type</title>
> >     <xsl:value-of select="@t"/>
> >   </formalpara>
> >   
> >   <formalpara>
> >     <title>Default Value</title>
> >     <xsl:value-of select="@val"/>
> >   </formalpara>
> >   </entry>
> > </row>
> > </xsl:template>
> > 
> > The macro in the XML source file looks like this:
> > 
> > <j_entry cmd="admin/user/mail" dsc="Quota of a
> mailbox in 
> > Megabytes. The default value is taken from the
> mail server 
> > default quota (see entry <xref linkend='mta_quota'
> 
> > xrefstyle='template:%t on page %p'/>)." rel="Mail
> Server" 
> > t="integer" ver="4.0"
> > val="30"/>
> > 
> > Thanks in advance!
> > Kind regard,
> > Nancy
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection 
> > around http://mail.yahoo.com 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.