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

RE: changing value of xi:include's href variable durin

Subject: RE: changing value of xi:include's href variable during compilationg with XSLTPROC
From: Nancy Brandt <nancy_brndt@xxxxxxxxx>
Date: Tue, 6 Nov 2007 07:59:25 -0800 (PST)
RE:  changing value of xi:include's href variable durin
Hello, dear Michael

First of all, big thanks for your prompt response and
for the patience! I really appreciate that. I am
afraid that without you showing me the exact syntax
that you describe, I wn't cope with that problem.
Please, show these changes on the template itself!!

Thanks in advance!!!
Best regards,
nancy

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

> Well, it just needs a bit more string manipulation:
> test for the "#" using
> contains(), extract the stuff before the "#" using
> substring-before() and
> the stuff after using substring-after(), and
> concatenate the bits together
> using concat(). Tedious, but not exactly difficult.
> 
> Michael Kay
> http://www.saxonica.com/ 
> 
> > -----Original Message-----
> > From: Nancy Brandt [mailto:nancy_brndt@xxxxxxxxx] 
> > Sent: 06 November 2007 15:13
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: RE:  changing value of xi:include's
> href 
> > variable during compilationg with XSLTPROC
> > 
> > Hi dear Michael,
> > 
> > First of all, thank you for the suggestion. This
> template did 
> > work with a little bit of modification:
> > <xsl:template match="xi:include">
> >   <xi:include>
> >     <xsl:copy-of select="@*"/>
> >     <xsl:attribute name="href">
> >       <xsl:copy-of select="@*"/>
> >       <xsl:value-of select="concat(@*,
> '.online')"/>
> >     </xsl:attribute>
> >   </xi:include>
> > </xsl:template>
> > 
> > So that during compilation a file name in
> xi:include href 
> > construction gets the ".online" suffix. But here
> is a problem:
> > In my source XML, there a couple of instance of
> the following 
> > href formats:
> > 
> > <xi:include
> xmlns:xi="http://www.w3.org/2001/XInclude"
> >  
> href="voip_features_operation.xml#sect_tel_op_rad"/>
> > 
> > where #sect_tel_op_rad is a specific section
> withing the 
> > voip_features_operation.xml. My question is how do
> I further 
> > customize the above template in order to change
> (during 
> > compilation)
> href="voip_features_operation.xml#sect_tel_op_rad"/>
> > with
> >
>
href="voip_features_operation.xml.online#sect_tel_op_rad"/>
> > 
> > Thank you very much in advance!!!
> > Nancy
> > --- Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > 
> > > > 
> > > > And now the tricky part: the xi:include
> mechanism.
> > > If I call
> > > > an XML file within another file via
> xi:include,
> > > the compiler
> > > > does not turn the included file to
> > > <filename>_online.xml.
> > > 
> > > Well from your description it looks like
> > > 
> > > <xsl:template match="xi:include">
> > >   <xi:include>
> > >     <xsl:copy-of select="@*"/>
> > >     <xsl:attribute name="href">
> > >       <xsl:value-of select="substring-before(.,
> '.')"/>
> > >       <xsl:text>_online.xml</xsl:text>
> > >     </xsl:attribute>
> > >   </xi:include>
> > > </xsl:template>
> > > 
> > > But perhaps I've completely misunderstood the
> requirement (or the 
> > > nature of your difficulty).
> > > 
> > > Michael Kay
> > > http://www.saxonica.com/
> > > 
> > > > 
> > > > This is a problem if the called file contains
> > > macros, for
> > > > example a macro for inserting graphics. The
> macro
> > > is not
> > > > processed, and it does  not turn to a
> mediaobject.
> > > > 
> > > > What I would like to have is a kind of a
> > > template/mechanism
> > > > which will automatically substitute all
> instances
> > > of
> > > > xi:include href="myfile.xml" with xi:include 
> > > > href="myfile_online.xml" during the first step
> of
> > > compilation
> > > > with XSLTPROC. 
> > > > 
> > > > Is it possible to create such?
> > > >  Please, advise...
> > > > 
> > > > Thank you very much in advance!!!!
> > > > My best wishes,
> > > > 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 
> 
> 


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

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.