|
Awesome. Glad to hear everything's working out. Although I am starting to feel like an XSL/XPath *cough*expert*cough*. Not sure if that's a good thing.
Logifusion[^]
If not entertaining, write your Congressman.
|
|
|
|
|
Hello There
can any one mail me or post me a link for complete reference on Xpath ?
rbashir@alm-soft.com
|
|
|
|
|
|
Consider this xml:
<br />
<rrx id="someother">...</rrx><br />
<rrx id="Zones"><br />
<f name="NM"><br />
<p name="xoxoxo"/><br />
</f><br />
<s name="GB"><br />
<p name="xexexe"/><br />
<p name="xaxaxa"/><br />
</s><br />
<a name="SP"><br />
<p name="hmhmhm"/><br />
</a><br />
<b name="Alien"><br />
<p name="opsops"/><br />
</b><br />
</rrx><br />
I need to select all "p" elements in "f","s" or "a" with a given "name" but not "b" which are in "rrx" with particular "id". So I'm trying to come up with or statement for f,s,a in the middle of XPath.
Using XSLT 2.0 and Xpath 2.0 this works fine:
//rrx[@id='Zones']/(f|s|a)[@name='GB']/p - I should get xexexe and xaxaxa and if
//rrx[@id='Zones']/(f|s|a)[@name='SP']/p - I need hmhmhm
But good old 1.0 says it's invalid. That () are not allowed there. How else would the XPath then look?
|
|
|
|
|
The feature you try to use is new to XPath 2.0
One of the ways you could solve it in XPath 1.0 would be:
instead of:
//rrx[@id='Zones']/(f|s|a)[@name='SP']/p
write:
//p[(parent::f[(@name='SP')and(parent::rrx[@id='Zones'])]) or (parent::s[(@name='SP')and(parent::rrx[@id='Zones'])]) or (parent::a)[(@name='SP')and(parent::rrx[@id='Zones'])]]
It does not look nice, but would be an example.
|
|
|
|
|
Hi all,
how would i set the page width in xsl to 80mm?
i want to create a template for a slip printer....
He who laughs last...
|
|
|
|
|
Okay thanks anyways, i'll just use a table and set it according.
Sorry, i thought of it a i posted the message.
He who laughs last...
|
|
|
|
|
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 ....
|
|
|
|