|
Hi!
I want to exclude an element from appearing within itself. I'm not sure if this is possible using XML Schema though. Can anyone clear this up for me please?
To exclude itself from appearing as a child I could use:
<xs:element name="person">
<xs:complexType>
<xs:element name="person" maxOccurs="0"/>
</xs:complexType>
</xs:element>
However, this doesn't exclude this element from appearing deeper in the hierarchy (e.g. as a grandchild) or does it? If not, is it possible?
Thanks
Jonnie
P.S. It may be apparent, that I'm a total newbie to XML Schema, but need to assess what is possible before diving in
|
|
|
|
|
Is there a way to make a heterogeneous XML/HTML file print like you'd wish it would? The following is XML, but our db person placed some HTML data in our data. It just prints like the html tags. I was hoping someone knew a fancy xsl thing. I just wish she had made it a separate note.
XML:
<specificnotes>
- <note>
<classification>U
<type>Undesignated
<note>Left/right.
- <note>
<classification>U
<type>Undesignated
<note>REQUIREMENTS
XSL Stylesheet uses default output method.
Thanks,
Lilian
|
|
|
|
|
Just in case anyone runs into this problem, here's the solution:
use the tag disable-output-escaping="yes" in your value of.
|
|
|
|
|
Hi, I have the following XSL code:
The set:distinct template from exslt.org:
<xsl:template name="set:distinct">
<xsl:param name="nodes" select="/.." />
<xsl:choose>
<xsl:when test="not($nodes)" />
<xsl:otherwise>
<xsl:apply-templates select="$nodes[1][not(. = $nodes[position() > 1])]" mode="set:distinct"/>
<xsl:call-template name="set:distinct">
<xsl:with-param name="nodes" select="$nodes[position() > 1]" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
and the following call to it:
<xsl:variable name="distinctVnames">
<xsl:call-template name="set:distinct">
<xsl:with-param name="nodes" select="//@vname" />
</xsl:call-template>
</xsl:variable>
After this the call variable value is a string with all distinct vname attributes of my xml document. thats fine. But the vname attributes appear in the result string in document order.
Does anybody have an idea how to change this in order to obtain the vname attributes in alphabetical order? Thank you very much!
|
|
|
|
|
Hi!
Does anybody have XML Schemas for OWC 9 and 10?
Thanks,
Dmitry.
|
|
|
|
|
Could anyone give me any advice on how to convert a VARIANT data type to XML?
thanks
|
|
|
|
|
Could you be a little more explicit. For example do you have a VARIANT holding a string like <tag>blah and you wish to put this into an XML document?
Or do you have a variant with some data not known and you wish to generate an XML out of it s contents. Well then what should your XML look like? Under what element would you want your VARIANT data to go?
Either way you could look into XMLDOMDocument40 LoadXML function.
Hope this helps.
|
|
|
|
|
Getting value from stuff you don't own is a compelling
idea. Just think, someone else has created something
that has value, and has made it available to you. You
can now leverage its value in ways that makes all
parties richer. That's the promise of web services.
You need to know about web services. The advent of
standards-based web services marks a new era of
system development. First mainframe, then client-server,
the Web, now web services makes it possible to leverage
every legacy system of the past and do so much more
with your information assets.
Architag Press, a division of Architag International
Corporation, announces the publication of Web Services
Implementation Guide, Volume 1: Getting Started, by
Brian E. Travis and Mae Ozkan.
Sample chapters of the book is available at
http://www.architag.com/press/wsig.
This book will show you what a web service is, and
how you can align your internal systems and external
trading partner interactions to take advantage of this
new concept in system integration.
You will learn about the "Three Steps to Web Services":
* Automate internal systems
* Determine integration points
* Expose integration points as web services
This book is for systems architects, developers,
and I.T. decision makers.
Highlights in this book:
* Written in a light, entertaining style.
* Emphasis on architectural design for web services.
* A tutorial on the state of web services standards.
* Plenty of real-life examples of web service use.
* Tutorials on the key technologies: XML, SOAP,
WSDL and UDDI.
* Code samples of key XML-based web services
technologies and extensions.
* Companion Web site with all code samples and
late-breaking information.
----
Download sample chapters of Web Services Implementation
Guide at http://www.architag.com/press/wsig/.
Stanford Powers, Publisher Architag International Corp
Phone: 866-898-0001 Outside US: +1-303-426-3126
Email: spowers@architag.com
|
|
|
|
|
Hi,
I am having some content in textfile.iam reading the content from file by using API called Read file.I convert this string to bstr using (_bstr_t)string and then i called the method LoadXML(string,bool).But when iam parsing this iam not getting output.
why it is so.
Thanks in advance.
|
|
|
|
|
if you're using MSXML, there is a method to load an XML file given a filename, not the file's contents... look it up in the MSXML SDK
- Roman -
|
|
|
|
|
Try this:
<nobr>Dim xml
Set xml = CreateObject("MSXML2.DOMDocument")
If Not WScript.Arguments.Count = 1 Then
WScript.Echo "Usage: cscript loadxml.vbs <xml-file.xml>"
WScript.Quit 0
End If
If Not xml.load(WScript.Arguments(0)) Then
WScript.Echo "The XML file couldn't be loaded:"
WScript.Echo " Error: " + xml.parseError.reason + _
" Error code: 0x" + Hex(xml.parseError.errorCode)
WScript.Echo " in File """ + xml.parseError.url + """"
WScript.Echo " @ row " + CStr(xml.parseError.line) + ", col " + CStr(xml.parseError.linepos)
If Not xml.parseError.srcText = "" Then
WScript.Echo
WScript.Echo xml.parseError.srcText
WScript.Echo String(xml.parseError.linepos - 1, "-") + "^"
End If
WScript.Quit -1
Else
WScript.Echo "XML file loaded sucessfully."
End If
' Sucessfully loaded DOM tree is now available in the xml var
WScript.Echo xml.xml
How to use
Save the code above as 'loadxml.vbs'
Type in your console 'wscript //H:cscript' to use the console version of your wscript host.
Goto to the subdirectory with your xml data and the script.
Type 'loadxml anyfile'
Voilá!
The function used to load the file is 'load' . Returns true/false wether it could load the file or not.
Good night everybody I need some sleep... zzzzzz zzzzzz
|
|
|
|
|
How'd you get that beautiful syntax highlighting?
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
I do it by hand . But I'm writing on a tool for highlighting to HTML code wich I will publish as an article .
Guess what I can already render XML to HTML! (no XSLT, cause it reads also comments, PIs etc.) All ya need is VBS and MSXML 3. But I still need a few weeks .
|
|
|
|
|
Has anyone else ever run across the need to generate an "empty" XML Document based on a Schema? I am using XSD schemas to define the state behind a VB form, using XPath expressions to implementing binding between nodes in the document and controls on the forms. I would like to generate a blank document when I load the form, so that all my XPath expressions are valid, even if they return no value.
Any ideas?
Thanks!
|
|
|
|
|
Hello,
I want to render XML on server side using JSP. How do I do it? Please give me some tips.
Thanks
Hitesh
|
|
|
|
|
hi,
What exactly do u mean by render XML ? Do u want to parse the XML and display the contents onto the browser ? If so, u can use the xerces parser which is an open-source from IBM-Apache. You can get it at http://xml.apache.org. Get the JAR - xerces.jar.
Rgds,
Sharad Ganesh
|
|
|
|
|
just use XSL
- Roman -
|
|
|
|
|
In case I want to create a xml schema to map with file directory tree structure, I tried the following schema:
<xs:element name="Manifest">
<xs:complexType>
<xs:sequence>
<xs:element ref="Manifest" maxOccurs="unbounded" />
<xs:element ref="Directory" maxOccurs="unbounded" />
<xs:element ref="File" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="Directory">
<xs:complexType>
<xs:sequence>
<xs:element ref="Directory" maxOccurs="unbounded" />
<xs:element ref="File" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="File">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
However, this schema will not allow me to generate a dataset in .NET because I use "file" and "directory" node recursively. I'd like to know how to solve this problem so that I can get a dataset out of it. Thanks in advance.
Sakda Chaiworawitkul
|
|
|
|
|
I need to POST XML data (via an ASP application) to an entity who has provided me a spec that seems a bit incomplete and their tech support is of no help. The spec says (to summarize) that "the user system (my app) will transmit the XML data through an HTTPS URI using a digital certificate".
Is it evident whether the application will use a server or a client certificate? Since my server is POSTing data to their server I would assume that I need a client certificate. However, I'm being told that I need a server certificate. If that's the case, how do I forward my server certificate to the URI I'm POSTing to.
Am I insane or incredibly naive? Can you even tell from the little information I've (been) given? Any additional links or resources would be appreciated. I've dug up very little info on Server to Server XML/SSL stuff.
|
|
|
|
|
Welcome
I have XML file:
<br />
<doc><br />
<field><br />
<name> myName</name><br />
<value> some value</value><br />
</field><br />
<field><br />
<name> otherName</name><br />
<value> other value</value><br />
</field><br />
</doc><br />
I have created XSL file:
<br />
<xsl:template match="/"><br />
<!-- transform fields --><br />
<xsl:for-each select="field"><br />
<xsl:choose><br />
<!-- i want get data from myName field --><br />
<xsl:when test="cd[name='myName']"><br />
<xsl:value-of select="value"/> <xsl:when><br />
<xsl:choose> <br />
</xsl:for-each><br />
</xsl:template><br />
unfortunately it doesn't create output file as:
some value
What is wrong?
|
|
|
|
|
Change the select attribute of the <xsl:for-each> element to either "doc/field" or "//field". <field> is not the root element; it's a child element.
Change the test attribute of the <xsl:when> element to contain the value "name=' myName'".
|
|
|
|
|
thx
(there was no space in oryginal
but correct version of test shoud look like
<br />
xsl:when test="name='myName'"<br />
|
|
|
|
|
I've seen this issue noted a few other places on the web, but so far no good solutions have been found.
I have an XSL file I'm using to transform some XML. This XSL file has existed for a long time now and has always worked on version of IE <= 5.5. Some of our clients are now moving to an IE6 environment and I've found that the new version of the XML parser included with IE6 messes up when performing the transform.
Specifically, when the transform attempts to output a textarea block, with code similar to this:
<DIV>
<TEXTAREA size="40," style="width:100%">
<xsl:attribute name="FIELD_TYPE">s</xsl:attribute>
<xsl:attribute name="DATA_TYPE">T</xsl:attribute>
</TEXTAREA>
</DIV>
The closing textarea tag is never output to the HTML when using the XML parser included with IE6. In IE <= 5.5 however this works just fine.
Has anybody else experienced similar problems, or have a suggestion for a solution? It would be appreciated! Thanks!
|
|
|
|
|
I think you can fix this by putting <xsl:text> </xsl:text> at the end of the attributes.
This should force it to insert a space into the text area, which in turn will split the <textarea/> shortcut into <textarea> </textarea>. The only problem is that the text box will have a space in it already for the user.
There may be another way to do this, I've never run into the problem myself.
|
|
|
|
|
Shouldnt you be using xsl:element to do this? xsl:element
Don't have time to test it but I assume something like this:
<xsl:element name="textarea">
<xsl:attribute name="FIELD_TYPE">s</xsl:attribute>
<xsl:attribute name="DATA_TYPE">T</xsl:attribute>
</xsl:element>
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
|
|
|
|