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

Re: Linking to a 6 level tag content

Subject: Re: Linking to a 6 level tag content
From: Kahlil Johnson <jzarecta@xxxxxxxxx>
Date: Thu, 23 Jun 2005 10:47:55 +0300
xmlns office
Hi Aron,

This is the namespaces for the office:document-content

<office:document-content
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
xmlns:ooo="http://openoffice.org/2004/office"
xmlns:ooow="http://openoffice.org/2004/writer"
xmlns:oooc="http://openoffice.org/2004/calc"
xmlns:dom="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
office:version="1.0">
<office:body>
	<office:spreadsheet>
	<table:table table:name="Sheet1" table:style-name="ta1" table:print="false">
            <table:table-column table:style-name="co1"
table:number-columns-repeated="7"
table:default-cell-style-name="Default"/>
	<table:table-row table:style-name="ro1">
	<table:table-cell office:value-type="float" office:value="23">
<text:p>23</text:p>

I actually generate an output by using this simple xsl but it seems
too raw and I have no idea what happened (which means I didnt learn at
all :p)

By simply using the xsl:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="office">
		<xsl:value-of select="text"/>
		</xsl:template>
</xsl:stylesheet>

But I have many doubts.
- Why I can't use the complete tag text:p or table:table-cell or office:xxx?
- Is there a way to identify it?
- How can I link all the way directly to the table:table-cell comming
from office:document (XPath)?

And yes, I am a newbie :p


On 6/23/05, Aron Bock <aronbock@xxxxxxxxxxx> wrote:
> Khalid, you don't need to put in the whole tree, but namespace
declarations,
> and syntactically complete XML helps.  As it is I've munged up your input:
>
>
> <office:document-content office:version="1.0"
>     xmlns:office="foo-office"
>     xmlns:table="foo-table"
>     xmlns:text="foo-text"
>     >
>         <office:body>
>         <office:spreadsheet>
>               <table:table >
>                    <table:table-column />
>                  <table:table-row table:style-name="ro1">
>                         <table:table-cell office:value-type="float"
> office:value="23">
>                                   <text:p>23</text:p>
>                     </table:table-cell>
>             </table:table-row>
>           </table:table>
>     </office:spreadsheet>
>     </office:body>
> </office:document-content>
>
> And this XSL:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:office="foo-office"
>     xmlns:table="foo-table"
>     xmlns:text="foo-text"
>     >
>
>     <xsl:output method="xml" indent="yes"/>
>
>     <xsl:template match="/">
>         <xsl:value-of select="office:document-content/office:body
>
/office:spreadsheet/table:table/table:table-row/table:table-cell
>             /text:p"
>             />
>     </xsl:template>
> </xsl:stylesheet>
>
> Outputs:
>
> <?xml version="1.0" encoding="UTF-8"?>
> 23
>
> Regards,
>
> --A
>
> >From: Kahlil Johnson <jzarecta@xxxxxxxxx>
> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >Subject: Re:  Linking to a 6 level tag content
> >Date: Wed, 22 Jun 2005 23:54:35 +0300
> >
> >Sorry I meant 23.. I didn't want to put the whole tree just the
> >relevant tags what I want is to know how exactly to get to the 23
> >value.
> >
> >On 6/22/05, Aron Bock <aronbock@xxxxxxxxxxx> wrote:
> > > Khalil,
> > >
> > > I don't see a "test:p > 21" in your input.  The closest is
> > > <text:p>23</text:p>
> > >
> > > If you could post a more complete snippet, with namespace decrarations
> >and
> > > end-tags, and specify if you want top copy the element or get its text
> > > value, I assume people could respond better.
> > >
> > > Regards,
> > >
> > > --A
> > >
> > > >From: Kahlil Johnson <jzarecta@xxxxxxxxx>
> > > >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > >To: XSL <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> > > >Subject:  Linking to a 6 level tag content
> > > >Date: Wed, 22 Jun 2005 13:03:32 +0300
> > > >
> > > >I have this xml and I want to capture the content  test:p > 21 from
> > > >the XSLT however I have problems targeting the branch:
> > > >
> > > >XML: output
> > > ><office:document-content office:version="1.0">
> > > >       <office:body>
> > > >       <office:spreadsheet>
> > > >             <table:table >
> > > >                    <table:table-column />
> > > >                <table:table-row table:style-name="ro1">
> > > >                       <table:table-cell office:value-type="float"
> > > >office:value="23">
> > > >                                   <text:p>23</text:p>
> > > >
> > > >I am using xsltproc to generate an output.
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>


--
Kahlil Johnson
"Ya tengo GMAIL!!"

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.