|
Sorry, the table idea didn't work. is it possible to set the page width, because if i try to print now, through the slip printer, it prints it fine but i keeps spitting out paper... my friend suggested that it could be because the xsl is using an A4 and the slip is only 80mm in width, actually 79.5mm, and it is not working correctly because of this...
Please help
He who laughs last...
|
|
|
|
|
The simple-page-master node has an available page-width property.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Excuse me for this quick noob question.
Let's say I have XML:
<br />
<a name="a1">text</a><br />
<a>text 2</a><br />
<a name="a3">text 3</a><br />
What's the XPath syntax to locate that secon "a" element that doen't have the "name" attribute?
-- modified at 12:42 Tuesday 1st August, 2006
|
|
|
|
|
Try this: a[not(boolean(@name))]
That will give you everything that doesn't have a name attribute.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Oh, that's great! Thanks a lot! Works!
|
|
|
|
|
Using "≤" the representation of "less or equal to sign" in an XML Doc gives an error. Any correct way to handle this?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
In what context are you using this symbol? Is it just somewhere in the XML text? Are you using it in an XPath? Are you doing a transformation? What kind of error are you getting? Does it not display correctly? Does it not transform?
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Thanks for the response. I am using it in the XML text. Currently, I used "<=", which displays as <=. But have seen ≤ used in MSDN.
Due to the XML Doc errors, the comment is ignored and never displayed.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Oh, I see. You meant code documentation. Ya, you have to use a CDATA tag for that. I use the character map tool in windows and paste it in there.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Thanks for the support. I am back to work and will be trying it today. Frankly, I have never thought of using the CDATA in XML Doc! or may be I forgot it is XML!!!
Have a nice day/night and God bless you.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
For some reason when I am parsing the xml from a stream using XMLTextReader I am unable to use the elements with Underscores in their names. Does anybody know why this is? Here is the code I am using:
'encapsulate the string to fool xmlreader
Dim strReader As StringReader = New StringReader(strXMLStream)
'Create the XML Reader
Dim m_xmlr As XmlTextReader = New XmlTextReader(strReader)
'Disable whitespace so that you don't have to read over whitespaces
m_xmlr.WhiteSpaceHandling = WhiteSpaceHandling.NONE
'read the xml declaration and advance to first line after ok
Dim i as integer
For i = 0 to 2
m_xmlr.Read()
Next
m_xmlr.Read()
m_xmlr.Read()
m_xmlr.Read()
Dim firstNameValue = m_xmlr.ReadElementString("AVAILABLE")
Dim exchangeValue = m_xmlr.ReadElementString("EXCHANGE_ID")
This brings an error saying the EXCHANGE_ID element can not be found but it is definately in the XML
James Boag. Genius
|
|
|
|
|
It doesn't have anything to do with the underscore. The XmlTextReader won't discriminate on that. Make sure that the "EXCHANGE_ID" node is directly after the "AVAILABLE" node.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Dear all,
I have a webservice project running on Computer A.
I am calling a webmethod from this web service from an asp.net project on computer B, it is working correctly.
But the problem is when i am trying to call the same webmethod from another asp.net project on the computer B, i am receiving this error:
The underlying connection was closed: Unable to connect to the remote server.
it is not a security problem or configuration since the same webmethod is working on the first asp.net project
Can anyone help, thanks.
|
|
|
|
|
Hi All,
How can I design a GUI for an application using XML and C++(MFC etc)
Any guidelines/links where I can read/study on this.
Thanks in advance
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi!
I am a beginner in XML and have just learnt how to SORT and conditionally CHOOSE XML data.
Now, I wonder how to use user-supplied keys to Sort or Choose the data in an XML document.
Any help, please! An example will be appreciated.
Raby
-- modified at 5:32 Saturday 29th July, 2006
|
|
|
|
|
Hi, I need some help with XSL:
I need to display all the <Criterio> elemnts inside the <CriteriosGenerales> node:
<CriteriosGenerales>
<Criterio>some text</Criterio>
<Criterio>another text</Criterio>
<Criterio>one more text</Criterio>
...
</CriteriosGenerales>
I've try this way in the XSL:
<ol>
<xsl:for-each select="CriteriosArea/Criterio">
<li><xsl:value-of select="Criterio"/></li>
</xsl:for-each>
</ol>
but it does'nt work..
Any idea?
|
|
|
|
|
Instead of <xsl:value-of select="Criterio"/>, use <xsl:value-of select="."/>
Logifusion[^]
|
|
|
|
|
Thanks!
Maybe I need to review something about XPATH ....
|
|
|
|
|
No problem. Check out w3schools[^] for a pretty decent xpath tutorial.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Hello ,
I am very new in XSL and I would like to know if someone can help me in that trick, at least give me some advice on how to that:
so i have this sample xml: (Sorry for this long post)
<?xml version="1.0"?>
<root>
<Rooms>
<Room>
<RommName>Suite</RommName>
<Informations>
<I>
<Currency>USD</Currency>
<Information>Internet</Information>
</I>
<price>
<A Date="31.07.2005"> 100</A>
<A Date="31.08.2005">411</A>
<A Date="30.09.2005">452</A>
<A Date="31.10.2005">452</A>
<B Date="31.07.2005">462</B>
<B Date="31.08.2005"> 125</B>
<B Date="30.09.2005">350</B>
</price>
</Informations>
</Room>
<Room>
<RommName>Little Suite</RommName>
<Informations>
<I>
<Currency>USD</Currency>
<Information>Internet</Information>
</I>
<price>
<A Date="30.04.2005"> 115</A>
<A Date="31.05.2005"> 115</A>
<A Date="30.06.2005"> 115</A>
<A Date="31.07.2005"> 115</A>
<A Date="31.08.2005">114</A>
<A Date="30.09.2005">115</A>
<B Date="31.08.2005">456</B>
<B Date="30.09.2005">456</B>
<B Date="31.10.2005"> 245</B>
<B Date="30.11.2005">250</B>
<B Date="31.12.2005">454</B>
</price>
</Informations>
</Room>
<Room>
<RommName>Suite 3</RommName>
<Informations>
<I>
<Currency>USD</Currency>
<Information>Internet</Information>
</I>
<price>
<A Date="31.12.2005"> 100</A>
</price>
</Informations>
</Room>
</Rooms>
</root>
and I would like to, according to ID of each room and accordance to each date of this ID I would to have the price of A and B. Maybe have two keys ???
<code><?xml version='1.0' ?>
<TEST>
<TableID>
<ID>1</ID>
<roomName>Suite</roomName>
<TableRoom>
<Date>31.07.2005</Date>
<ID>1</ID>
<A> 100</A>
<B>462</B>
</TableRoom>
<TableRoom>
<Date>31.08.2005</Date>
<ID>1</ID>
<A>411</A>
<B> 125</B>
</TableRoom>
<TableRoom>
<Date>30.09.2005</Date>
<ID>1</ID>
<A>452</A>
<B>350</B>
</TableRoom>
<TableRoom>
<Date>31.10.2005</Date>
<ID>1</ID>
<A>452</A>
</TableRoom>
</TableID>
...
this is my xsl code
<code><?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:key name="roomName" match="root/Rooms/Room/RoomName" use="generate-id()"/>
<xsl:key name="dates" match="@Date" use="."/>
<xsl:key name="id" match="root/Rooms/Room" use="generate-id()"/>
<xsl:template match="/">
<TEST>
<xsl:for-each select="root/Rooms/Room">
<TableID>
<xsl:apply-templates select="root/Rooms/Room"/>
<xsl:variable name="vRowInd">
<xsl:number count="Room" level="any"/>
</xsl:variable>
<ID>
<xsl:value-of select="$vRowInd"/>
</ID>
<roomName>
<xsl:value-of select="RommName"/>
</roomName>
<xsl:apply-templates />
</TableID>
</xsl:for-each>
</TEST>
</xsl:template>
<xsl:template match="node()[not(descendant-or-self::price)]| @* ">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="price">
<xsl:for-each select="*[count(key('roomName',/root/Rooms/Room/roomName)[1] | ./@Date ) = 1 ]">
<TableRoom >
<Date>
<xsl:value-of select="@Date"/>
</Date>
<xsl:variable name="vRowInd">
<xsl:number count="Room" level="any"/>
</xsl:variable>
<ID>
<xsl:value-of select="$vRowInd"/>
</ID>
<xsl:for-each select="@Date/parent::*">
<xsl:element name="{local-name(.)}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:for-each>
</TableRoom>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet></code>
Ina
|
|
|
|
|
What I am trying to do it is a tri-dimensional table to be exact. I would like after be able to import this data into ms access. I need to find a way to group by id and date. any idea how to do that in xsl.
Ina
|
|
|
|
|
Hello,
I am a fresher to VC++. i have to connect to a system using webservice in VC++, the protocol used is SOAP. and i have to retieve some data from that system. can any one help me in this.
Ajith
|
|
|
|
|
Hi All,
I want to insert a page-sequence for every 5 table rows.
Here is what i have thus far...
<xsl:variable name="STOP" select="5"/>
<xsl:for-each select="TablePop/TableInfo[position() mod $STOP = 1]">
<fo:page-sequence master-reference="simple" initial-page-number="auto">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="750pt">
<fo:table-column column-width="200pt"/>
<fo:table-column column-width="275pt"/>
<fo:table-column column-width="275pt"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block text-align="left" font-size="10pt" font-family="Courier">
Title1
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="left" font-size="10pt" font-family="Courier">
Title2
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="left" font-size="10pt" font-family="Courier">
Title3
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:for-each select=".|following-sibling::TablePop/TableInfo[position() < $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
here is the later bit...
<xsl:template match="TablePop">
<fo:table table-layout="fixed" width="750pt">
<fo:table-column column-width="200pt"/>
<fo:table-column column-width="275pt"/>
<fo:table-column column-width="275pt"/>
<fo:table-body>
<xsl:for-each select="TableInfo">
<fo:table-row>
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientTitle"/>
</fo:block>
</fo:table-cell>
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientName"/>
</fo:block>
</fo:table-cell>
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientSurname"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:template>
I can display the titles: Title1 Title2 Title3
each one of these titles are on a seperate page, That is Fine. Now i can't get the data to display underneath the Title1 Title2 Title3.
example
Title1--Title2--Title3
mr John White
mrs Sam Blue
prof Ed Black
He who laughs last...
|
|
|
|
|
Here is the part that contains the xml where the data is that i need to display
<TablePop>
<TableInfo Key="0">
<ClientName>Estelle</ClientName>
<ClientSurname>Van Graan</ClientSurname>
</TableInfo>
<TableInfo Key="1">
<ClientTitle>Mr</ClientTitle>
<ClientName>Natalie</ClientName>
<ClientSurname>Liebenberg</ClientSurname>
</TableInfo>
<TableInfo Key="2">
<ClientTitle>Mr</ClientTitle>
<ClientName>Irma</ClientName>
<ClientSurname>Du Plessis</ClientSurname>
</TableInfo>
<TableInfo Key="3">
<ClientTitle>Mr</ClientTitle>
<ClientName>Sandra</ClientName>
<ClientSurname>Nortje</ClientSurname>
</TableInfo>
<TableInfo Key="4">
<ClientTitle>Mr</ClientTitle>
<ClientName>Sandra</ClientName>
<ClientSurname>Nortye</ClientSurname>
</TableInfo>
<TableInfo Key="5">
<ClientTitle>Mr</ClientTitle>
<ClientName>Kathy</ClientName>
<ClientSurname>Ferreira</ClientSurname>
</TableInfo>
<TableInfo Key="6">
<ClientTitle>Mr</ClientTitle>
<ClientName>Antionette</ClientName>
<ClientSurname>Viloene</ClientSurname>
</TableInfo>
<TableInfo Key="7">
<ClientTitle>Mr</ClientTitle>
<ClientName>Lindsay</ClientName>
<ClientSurname>Scot</ClientSurname>
</TableInfo>
<TableInfo Key="8">
<ClientTitle>Mr</ClientTitle>
<ClientName>Waynand</ClientName>
<ClientSurname>Wessels</ClientSurname>
</TableInfo>
<TableInfo Key="9">
<ClientTitle>Mr</ClientTitle>
<ClientName>Anja</ClientName>
<ClientSurname>Eggers</ClientSurname>
</TableInfo>
<TableInfo Key="10">
<ClientTitle>Miss</ClientTitle>
<ClientName>Susca</ClientName>
<ClientSurname>Watts</ClientSurname>
</TableInfo>
<TableInfo Key="11">
<ClientTitle>Prof</ClientTitle>
<ClientName>Elsabe</ClientName>
<ClientSurname>Van Zyl</ClientSurname>
</TableInfo>
</TablePop>
He who laughs last...
|
|
|
|
|
The part where i put
<xsl:for-each select=".|following-sibling::TablePop/TableInfo[position() < $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
I don't thing that the Template TablePop actualy gets applied. How do i go about it. Any help would be greatly appreciated.
Thank you in advance...
He who laughs last...
|
|
|
|